(hq_env: HqEnv, flavor: ManagerFlavor)
| 534 | |
| 535 | @all_flavors |
| 536 | def 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 |
nothing calls this directly
no test coverage detected