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

Function test_server_lost_no_tasks

tests/test_worker.py:263–268  ·  view source on GitHub ↗
(hq_env: HqEnv, policy: str)

Source from the content-addressed store, hash-verified

261
262@pytest.mark.parametrize("policy", ["stop", "finish-running"])
263def test_server_lost_no_tasks(hq_env: HqEnv, policy: str):
264 hq_env.start_server()
265 worker = hq_env.start_worker(on_server_lost=policy)
266 hq_env.kill_server()
267 time.sleep(0.5)
268 hq_env.check_process_exited(worker, expected_code=1)
269
270
271def test_server_lost_stop_with_task(hq_env: HqEnv):

Callers

nothing calls this directly

Calls 5

kill_serverMethod · 0.80
sleepMethod · 0.80
check_process_exitedMethod · 0.80
start_serverMethod · 0.45
start_workerMethod · 0.45

Tested by

no test coverage detected