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

Function test_pass_on_server_lost

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

Source from the content-addressed store, hash-verified

534
535@all_flavors
536def test_pass_on_server_lost(hq_env: HqEnv, flavor: ManagerFlavor):
537 manager = ExtractSubmitScriptPath(flavor.create_adapter())
538
539 with MockJobManager(hq_env, manager):
540 start_server_with_quick_refresh(hq_env)
541 prepare_tasks(hq_env)
542
543 add_queue(
544 hq_env,
545 manager=flavor.manager_type(),
546 additional_worker_args=["--on-server-lost=stop"],
547 )
548 script_path = manager.get_script_path()
549 line = parse_exec_line(script_path)
550 assert normalize_output(hq_env, flavor.manager_type(), line.cmd) == snapshot(
551 '<hq-binary> worker start --idle-timeout "5m" --manager "<manager>" --server-dir "<server-dir>/001"'
552 ' --on-server-lost "stop" --time-limit "1h"'
553 )
554
555
556@all_flavors

Callers

nothing calls this directly

Calls 10

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

Tested by

no test coverage detected