test: await scheduler history settlement
This commit is contained in:
@@ -544,6 +544,7 @@ async def test_interrupt_restart_resume_reinterrupt(tmp_path: Path) -> None:
|
|||||||
FileRunStore(root).get_run(run_id).latest_checkpoint_id
|
FileRunStore(root).get_run(run_id).latest_checkpoint_id
|
||||||
== f"{run_id}.000001"
|
== f"{run_id}.000001"
|
||||||
)
|
)
|
||||||
|
await _wait_for(lambda: len(_entries(root, "asker", "interrupted")) == 1)
|
||||||
assert len(_entries(root, "asker", "interrupted")) == 1
|
assert len(_entries(root, "asker", "interrupted")) == 1
|
||||||
finally:
|
finally:
|
||||||
await first.stop()
|
await first.stop()
|
||||||
@@ -927,6 +928,7 @@ async def test_paused_deleted_run_completion(
|
|||||||
await _wait_for(
|
await _wait_for(
|
||||||
lambda: FileRunStore(root).get_run(gated_id).status.value == "completed"
|
lambda: FileRunStore(root).get_run(gated_id).status.value == "completed"
|
||||||
)
|
)
|
||||||
|
await _wait_for(lambda: len(_entries(root, "pausable", "completed")) == 1)
|
||||||
assert len(_entries(root, "pausable", "completed")) == 1
|
assert len(_entries(root, "pausable", "completed")) == 1
|
||||||
|
|
||||||
# A paused double-interrupt schedule still resumes through the API.
|
# A paused double-interrupt schedule still resumes through the API.
|
||||||
@@ -985,6 +987,7 @@ async def test_paused_deleted_run_completion(
|
|||||||
await _wait_for(
|
await _wait_for(
|
||||||
lambda: FileRunStore(root).get_run(doomed_id).status.value == "completed"
|
lambda: FileRunStore(root).get_run(doomed_id).status.value == "completed"
|
||||||
)
|
)
|
||||||
|
await _wait_for(lambda: len(_entries(root, "doomed", "completed")) == 1)
|
||||||
assert len(_entries(root, "doomed", "completed")) == 1
|
assert len(_entries(root, "doomed", "completed")) == 1
|
||||||
with pytest.raises(ScheduleExistsError):
|
with pytest.raises(ScheduleExistsError):
|
||||||
FileScheduleStore(root).create_schedule(
|
FileScheduleStore(root).create_schedule(
|
||||||
|
|||||||
Reference in New Issue
Block a user