diff --git a/tests/worker/test_workflow.py b/tests/worker/test_workflow.py index d13debf12..ff9ba8a02 100644 --- a/tests/worker/test_workflow.py +++ b/tests/worker/test_workflow.py @@ -2946,12 +2946,21 @@ async def waiting_signal() -> bool: task_queue=task_queue, ) + # Need to wait until it has gotten halfway through, otherwise the post_patch workflow may never complete + async def waiting_signal() -> bool: + return await post_patch_handle.query( + PatchMemoizedWorkflowPatched.waiting_signal + ) + + await assert_eq_eventually(True, waiting_signal) + # Send signal to both and check results await pre_patch_handle.signal(PatchMemoizedWorkflowUnpatched.signal) await post_patch_handle.signal(PatchMemoizedWorkflowPatched.signal) # Confirm expected values assert ["some-value"] == await pre_patch_handle.result() + assert [ "pre-patch", "some-value",