diff --git a/tests/wf_server/test_scheduler_integration.py b/tests/wf_server/test_scheduler_integration.py index fc84845c..73de92f7 100644 --- a/tests/wf_server/test_scheduler_integration.py +++ b/tests/wf_server/test_scheduler_integration.py @@ -544,6 +544,7 @@ async def test_interrupt_restart_resume_reinterrupt(tmp_path: Path) -> None: FileRunStore(root).get_run(run_id).latest_checkpoint_id == f"{run_id}.000001" ) + await _wait_for(lambda: len(_entries(root, "asker", "interrupted")) == 1) assert len(_entries(root, "asker", "interrupted")) == 1 finally: await first.stop() @@ -927,6 +928,7 @@ async def test_paused_deleted_run_completion( await _wait_for( 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 # A paused double-interrupt schedule still resumes through the API. @@ -985,6 +987,7 @@ async def test_paused_deleted_run_completion( await _wait_for( 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 with pytest.raises(ScheduleExistsError): FileScheduleStore(root).create_schedule(