File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -405,8 +405,20 @@ async def check_behavior_for_wait_cancellation_completed(
405405 Check that a cancellation request is sent and the caller workflow nexus operation future is
406406 unblocked after the operation is canceled.
407407 """
408+ # For WAIT_COMPLETED, wait for the handler workflow to complete
409+ try :
410+ await handler_wf .result ()
411+ except WorkflowFailureError as err :
412+ assert isinstance (err .__cause__ , exceptions .CancelledError )
413+ else :
414+ pytest .fail ("Expected WorkflowFailureError" )
415+
408416 handler_status = (await handler_wf .describe ()).status
409417 assert handler_status == WorkflowExecutionStatus .CANCELED
418+
419+ await caller_wf .signal (CallerWorkflow .release )
420+ result = await caller_wf .result ()
421+
410422 await _assert_event_subsequence (
411423 [
412424 (caller_wf , EventType .EVENT_TYPE_WORKFLOW_EXECUTION_STARTED ),
@@ -420,7 +432,6 @@ async def check_behavior_for_wait_cancellation_completed(
420432 (caller_wf , EventType .EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED ),
421433 ]
422434 )
423- result = await caller_wf .result ()
424435 caller_op_future_resolved = test_context .caller_op_future_resolved .result ()
425436 handler_wf_canceled_event_time = await _get_event_time (
426437 handler_wf ,
You can’t perform that action at this time.
0 commit comments