Skip to content

Commit 7cbc222

Browse files
committed
Add debugging output
1 parent 0d42aaf commit 7cbc222

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tests/nexus/test_workflow_caller_cancellation_types.py

Lines changed: 4 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

@@ -329,6 +330,9 @@ async def check_behavior_for_try_cancel(
329330
handler_status = (await handler_wf.describe()).status
330331
assert handler_status == WorkflowExecutionStatus.CANCELED
331332
caller_op_future_resolved = test_context.caller_op_future_resolved.result()
333+
334+
await print_interleaved_histories([caller_wf, handler_wf])
335+
332336
await assert_event_subsequence(
333337
[
334338
(caller_wf, EventType.EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED),

tests/nexus/test_workflow_caller_cancellation_types_when_cancel_handler_fails.py

Lines changed: 3 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,
@@ -301,6 +302,8 @@ async def check_behavior_for_try_cancel(
301302
assert result.error_cause_type == "CancelledError"
302303

303304
caller_op_future_resolved = test_context.caller_op_future_resolved.result()
305+
await print_interleaved_histories([caller_wf, handler_wf])
306+
304307
await assert_event_subsequence(
305308
[
306309
(caller_wf, EventType.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED),

0 commit comments

Comments
 (0)