(hq_env: HqEnv)
| 269 | |
| 270 | |
| 271 | def test_server_lost_stop_with_task(hq_env: HqEnv): |
| 272 | hq_env.start_server() |
| 273 | worker = hq_env.start_worker(on_server_lost="stop") |
| 274 | path = os.path.join(hq_env.work_path, "finished") |
| 275 | hq_env.command(["submit", "--array=1-10", "--", "bash", "-c", f"sleep 3; touch {path}"]) |
| 276 | wait_for_job_state(hq_env, 1, "RUNNING") |
| 277 | hq_env.kill_server() |
| 278 | hq_env.check_process_exited(worker, expected_code=1) |
| 279 | assert not os.path.isfile(path) |
| 280 | |
| 281 | |
| 282 | def test_server_lost_finish_running_with_task(hq_env: HqEnv): |
nothing calls this directly
no test coverage detected