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

Function test_worker_stop_all

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

Source from the content-addressed store, hash-verified

103
104
105def test_worker_stop_all(hq_env: HqEnv):
106 hq_env.start_server()
107 processes = [hq_env.start_worker() for _ in range(4)]
108
109 wait_for_worker_state(hq_env, [1, 2, 3, 4], ["RUNNING" for _ in range(4)])
110 hq_env.command(["worker", "stop", "all"])
111 wait_for_worker_state(hq_env, [1, 2, 3, 4], ["STOPPED" for _ in range(4)], check_running_processes=False)
112
113 for process in processes:
114 hq_env.check_process_exited(process)
115
116
117def test_worker_stop_last(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