Skip to content

Commit 9fd6f68

Browse files
committed
Address some test comments, fix sdk-core commit change
1 parent eb026cd commit 9fd6f68

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

temporalio/bridge/sdk-core

tests/worker/test_replayer.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import asyncio
22
import random
3+
import re
34
import sys
45
import uuid
56
from dataclasses import dataclass
@@ -543,3 +544,17 @@ async def test_swallowed_activity_cancellation() -> None:
543544
workflows=[QuickActivityWorkflow],
544545
interceptors=[WorkerWorkflowResultInterceptor()],
545546
).replay_workflow(WorkflowHistory.from_json("fake", history))
547+
548+
549+
async def test_swallowed_activity_cancellation_no_flag() -> None:
550+
with (
551+
Path(__file__)
552+
.with_name("test_replayer_swallowed_activity_cancellation.json")
553+
.open() as f
554+
):
555+
history = f.read()
556+
history = re.sub(r'"langUsedFlags": \[\s*1\s*]', "", history)
557+
await Replayer(
558+
workflows=[QuickActivityWorkflow],
559+
interceptors=[WorkerWorkflowResultInterceptor()],
560+
).replay_workflow(WorkflowHistory.from_json("fake", history))

tests/worker/test_workflow.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7971,3 +7971,5 @@ async def test_quick_activity_swallows_cancellation(client: Client):
79717971

79727972
assert isinstance(cause, CancelledError)
79737973
assert cause.message == "Workflow cancelled"
7974+
7975+
temporalio.worker._workflow_instance._raise_on_cancelling_completed_activity_override = False

0 commit comments

Comments
 (0)