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

Function test_worker_stop

tests/test_worker.py:77–89  ·  view source on GitHub ↗
(hq_env: HqEnv)

Source from the content-addressed store, hash-verified

75
76
77def test_worker_stop(hq_env: HqEnv):
78 hq_env.start_server()
79 process = hq_env.start_worker()
80
81 wait_for_worker_state(hq_env, 1, "RUNNING")
82 hq_env.command(["worker", "stop", "1"])
83 wait_for_worker_state(hq_env, 1, "STOPPED", check_running_processes=False)
84 hq_env.check_process_exited(process)
85
86 response = hq_env.command(["worker", "stop", "1"])
87 assert "worker is already stopped" in response
88 response = hq_env.command(["worker", "stop", "2"])
89 assert "worker not found" in response
90
91
92def test_worker_stop_some(hq_env: HqEnv):

Callers

nothing calls this directly

Calls 5

wait_for_worker_stateFunction · 0.85
commandMethod · 0.80
check_process_exitedMethod · 0.80
start_serverMethod · 0.45
start_workerMethod · 0.45

Tested by

no test coverage detected