diff --git a/tests/worker/test_workflow.py b/tests/worker/test_workflow.py index cca6e779d..1f7079190 100644 --- a/tests/worker/test_workflow.py +++ b/tests/worker/test_workflow.py @@ -6845,6 +6845,14 @@ async def _run_workflow_and_get_warning(self) -> bool: id=workflow_id, task_queue=task_queue, ) + # Keep the update on the run that receives it so continue-as-new cannot + # make a completion poll look for the update on the successor run. + assert handle.result_run_id + handle = self.client.get_workflow_handle( + workflow_id, + run_id=handle.result_run_id, + first_execution_run_id=handle.first_execution_run_id, + ) if self.workflow_termination_type == "-cancellation-": await handle.cancel()