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

Function test_repeated_restore

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

Source from the content-addressed store, hash-verified

158
159
160def test_repeated_restore(hq_env: HqEnv, tmp_path):
161 journal_path = os.path.join(tmp_path, "my.journal")
162 hq_env.start_server(args=["--journal", journal_path])
163 hq_env.command(["submit", "--array=0-3", "--", "uname"])
164 hq_env.stop_server()
165
166 hq_env.start_server(args=["--journal", journal_path])
167 hq_env.command(["submit", "--array=0-3", "--", "uname"])
168 time.sleep(1.0)
169 hq_env.stop_server()
170
171 hq_env.start_server(args=["--journal", journal_path])
172 out = hq_env.command(["--output-mode=json", "job", "list"], as_json=True)
173 assert len(out) == 2
174
175
176def test_restore_not_fully_written_log(hq_env: HqEnv, tmp_path):

Callers

nothing calls this directly

Calls 4

commandMethod · 0.80
sleepMethod · 0.80
start_serverMethod · 0.45
stop_serverMethod · 0.45

Tested by

no test coverage detected