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

Function test_restore_fully_finished

tests/test_journal.py:16–31  ·  view source on GitHub ↗
(hq_env: HqEnv, tmp_path)

Source from the content-addressed store, hash-verified

14
15
16def test_restore_fully_finished(hq_env: HqEnv, tmp_path):
17 journal_path = os.path.join(tmp_path, "my.journal")
18 hq_env.start_server(args=["--journal", journal_path])
19 hq_env.start_worker()
20 hq_env.command(["submit", "--array=0-3", "--", "uname"])
21 hq_env.command(["submit", "--", "sleep", "0"])
22 wait_for_job_state(hq_env, [1, 2], "FINISHED")
23 hq_env.stop_server()
24
25 hq_env.start_server(args=["--journal", journal_path])
26 hq_env.start_worker()
27 hq_env.command(["submit", "--", "sleep", "0"])
28 wait_for_job_state(hq_env, 3, "FINISHED")
29
30 table = hq_env.command(["worker", "list"], as_table=True)
31 table.check_columns_value(["ID", "State"], 0, ["3", "RUNNING"])
32
33
34def test_restore_waiting_task(hq_env: HqEnv, tmp_path):

Callers

nothing calls this directly

Calls 6

wait_for_job_stateFunction · 0.85
commandMethod · 0.80
check_columns_valueMethod · 0.80
start_serverMethod · 0.45
start_workerMethod · 0.45
stop_serverMethod · 0.45

Tested by

no test coverage detected