Skip to content

Commit 134072e

Browse files
committed
Cleanup
1 parent f9feee2 commit 134072e

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

tests/nexus/test_workflow_caller_cancellation_types.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
)
1717
from temporalio.testing import WorkflowEnvironment
1818
from temporalio.worker import Worker
19-
from tests.helpers import assert_eq_eventually, print_interleaved_histories
2019
from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name
2120

2221

@@ -93,9 +92,6 @@ async def check_behavior_for_abandon(
9392
Check that a cancellation request is not sent.
9493
"""
9594
await asyncio.sleep(0.5)
96-
97-
await print_interleaved_histories(caller_wf, handler_wf)
98-
9995
handler_status = (await handler_wf.describe()).status
10096
assert handler_status == WorkflowExecutionStatus.RUNNING
10197
await _assert_event_subsequence(
@@ -144,7 +140,6 @@ async def check_behavior_for_wait_cancellation_completed(
144140
"""
145141
handler_status = (await handler_wf.describe()).status
146142
assert handler_status == WorkflowExecutionStatus.CANCELED
147-
await print_interleaved_histories(caller_wf, handler_wf)
148143
await _assert_event_subsequence(
149144
[
150145
(caller_wf, EventType.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED),
@@ -198,9 +193,11 @@ async def test_cancellation_type(
198193
task_queue=worker.task_queue,
199194
)
200195
operation_token = (await caller_wf.result()).operation_token
201-
handler_wf = nexus.WorkflowHandle.from_token(
202-
operation_token
203-
)._to_client_workflow_handle(client)
196+
handler_wf = (
197+
nexus.WorkflowHandle[None]
198+
.from_token(operation_token)
199+
._to_client_workflow_handle(client)
200+
)
204201

205202
if input.cancellation_type == workflow.NexusOperationCancellationType.ABANDON:
206203
await check_behavior_for_abandon(caller_wf, handler_wf)
@@ -258,9 +255,3 @@ def _event_time(
258255
),
259256
None,
260257
), f"Expected {expected_event_type_name} in {expected_handle.id}"
261-
262-
263-
async def _assert_has_event_eventually(
264-
wf_handle: WorkflowHandle, event_type: EventType.ValueType
265-
) -> None:
266-
await assert_eq_eventually(True, lambda: _has_event(wf_handle, event_type))

0 commit comments

Comments
 (0)