MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / test_start_stop_cmd

Function test_start_stop_cmd

tests/autoalloc/test_autoalloc.py:574–593  ·  view source on GitHub ↗
(hq_env: HqEnv, flavor: ManagerFlavor)

Source from the content-addressed store, hash-verified

572
573@all_flavors
574def test_start_stop_cmd(hq_env: HqEnv, flavor: ManagerFlavor):
575 manager = ExtractSubmitScriptPath(flavor.create_adapter())
576
577 with MockJobManager(hq_env, manager):
578 start_server_with_quick_refresh(hq_env)
579 prepare_tasks(hq_env)
580
581 add_queue(
582 hq_env,
583 manager=flavor.manager_type(),
584 start_cmd="init.sh",
585 stop_cmd="unload.sh",
586 )
587
588 script = manager.get_script_path()
589 assert normalize_output(hq_env, flavor.manager_type(), get_exec_line(script)) == snapshot(
590 'init.sh && RUST_LOG=tako=trace,hyperqueue=trace <hq-binary> worker start --idle-timeout "5m" --manager'
591 ' "<manager>" --server-dir "<server-dir>/001" --on-server-lost "finish-running" --time-limit "1h";'
592 " unload.sh"
593 )
594
595
596@all_flavors

Callers

nothing calls this directly

Calls 10

get_script_pathMethod · 0.95
MockJobManagerClass · 0.85
prepare_tasksFunction · 0.85
normalize_outputFunction · 0.85
get_exec_lineFunction · 0.85
add_queueFunction · 0.70
create_adapterMethod · 0.45
manager_typeMethod · 0.45

Tested by

no test coverage detected