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

Function test_idle_timeout_server_cfg

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

Source from the content-addressed store, hash-verified

166
167
168def test_idle_timeout_server_cfg(hq_env: HqEnv):
169 hq_env.start_server(args=["--idle-timeout", "1s"])
170 w = hq_env.start_worker(args=["--heartbeat", "500ms"])
171 time.sleep(0.5)
172 hq_env.command(["submit", "--", "sleep", "1"])
173 time.sleep(1.0)
174 table = list_all_workers(hq_env)
175 table.check_column_value("State", 0, "RUNNING")
176
177 time.sleep(1.5)
178 hq_env.check_process_exited(w, expected_code=None)
179 table = list_all_workers(hq_env)
180 table.check_column_value("State", 0, "IDLE TIMEOUT")
181
182
183def test_idle_timeout_worker_cfg(hq_env: HqEnv):

Callers

nothing calls this directly

Calls 7

list_all_workersFunction · 0.85
sleepMethod · 0.80
commandMethod · 0.80
check_column_valueMethod · 0.80
check_process_exitedMethod · 0.80
start_serverMethod · 0.45
start_workerMethod · 0.45

Tested by

no test coverage detected