Skip to content

Commit c947a79

Browse files
committed
Wait for post patch to also reach waiting signal
1 parent d392365 commit c947a79

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/worker/test_workflow.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2950,6 +2950,16 @@ async def waiting_signal() -> bool:
29502950

29512951
print("Signalling")
29522952

2953+
# Need to wait until it has gotten halfway through, otherwise the post_patch workflow may never complete
2954+
async def waiting_signal() -> bool:
2955+
return await post_patch_handle.query(
2956+
PatchMemoizedWorkflowPatched.waiting_signal
2957+
)
2958+
2959+
print("Waiting for post patch waiting signal")
2960+
await assert_eq_eventually(True, waiting_signal)
2961+
print("Waited for post patch waiting signal")
2962+
29532963
# Send signal to both and check results
29542964
await pre_patch_handle.signal(PatchMemoizedWorkflowUnpatched.signal)
29552965
await post_patch_handle.signal(PatchMemoizedWorkflowPatched.signal)

0 commit comments

Comments
 (0)