diff --git a/tests/worker/test_workflow.py b/tests/worker/test_workflow.py index fe720564a..42ba0b69c 100644 --- a/tests/worker/test_workflow.py +++ b/tests/worker/test_workflow.py @@ -6969,9 +6969,6 @@ async def _run_workflow_and_get_warning(self) -> bool: id=workflow_id, task_queue=task_queue, ) - if self.workflow_termination_type == "-cancellation-": - await handle.cancel() - if self.handler_type == "-update-": update_method = ( "__does_not_exist__" @@ -7000,6 +6997,9 @@ async def _run_workflow_and_get_warning(self) -> bool: ) await handle.signal(signal_method) # type: ignore + if self.workflow_termination_type == "-cancellation-": + await handle.cancel() + async with new_worker( self.client, UnfinishedHandlersOnWorkflowTerminationWorkflow,