(hq_env: HqEnv, tmp_path)
| 14 | |
| 15 | |
| 16 | def 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 | |
| 34 | def test_restore_waiting_task(hq_env: HqEnv, tmp_path): |
nothing calls this directly
no test coverage detected