Skip to content

Commit 673cc8d

Browse files
committed
WAIT_COMPLETED
1 parent 1d74484 commit 673cc8d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/nexus/test_workflow_caller_cancellation_types.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)