Skip to content

Commit 58f6c80

Browse files
committed
Add debug output
1 parent eb202e9 commit 58f6c80

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

tests/nexus/test_workflow_caller_cancellation_types.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from temporalio.common import WorkflowIDConflictPolicy
2222
from temporalio.testing import WorkflowEnvironment
2323
from temporalio.worker import Worker
24+
from tests.helpers import print_interleaved_histories
2425
from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name
2526

2627

@@ -420,6 +421,13 @@ async def check_behavior_for_wait_cancellation_completed(
420421
await caller_wf.signal(CallerWorkflow.release)
421422
result = await caller_wf.result()
422423

424+
await print_interleaved_histories(
425+
[caller_wf, handler_wf],
426+
extra_events=[
427+
(caller_wf, "op future resolved", result.caller_op_future_resolved),
428+
],
429+
)
430+
423431
await assert_event_subsequence(
424432
[
425433
(caller_wf, EventType.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED),

tests/nexus/test_workflow_caller_cancellation_types_when_cancel_handler_fails.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from temporalio.common import WorkflowIDConflictPolicy
2424
from temporalio.testing import WorkflowEnvironment
2525
from temporalio.worker import Worker
26+
from tests.helpers import print_interleaved_histories
2627
from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name
2728
from tests.nexus.test_workflow_caller_cancellation_types import (
2829
assert_event_subsequence,
@@ -362,6 +363,14 @@ async def check_behavior_for_wait_cancellation_completed(
362363
await handler_wf.result()
363364
await caller_wf.signal(CallerWorkflow.release)
364365
result = await caller_wf.result()
366+
367+
await print_interleaved_histories(
368+
[caller_wf, handler_wf],
369+
extra_events=[
370+
(caller_wf, "op future resolved", result.caller_op_future_resolved),
371+
],
372+
)
373+
365374
assert not result.error_type
366375
# Note that the relative order of these two events is non-deterministic, since one is the result
367376
# of the cancel handler response being processed and the other is the result of the handler

0 commit comments

Comments
 (0)