Skip to content

Commit 5f6824e

Browse files
committed
Actual flaky test fix
1 parent 776f916 commit 5f6824e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tests/durabletask-azuremanaged/test_dts_orchestration_e2e.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ def orchestrator(ctx: task.OrchestrationContext, _):
265265
# # Raise an event to the orchestration and confirm that it does NOT complete
266266
# task_hub_client.raise_orchestration_event(id, "my_event", data=42)
267267
# try:
268-
# state = task_hub_client.wait_for_orchestration_completion(id, timeout=30)
268+
# state = task_hub_client.wait_for_orchestration_completion(id, timeout=3)
269269
# assert False, "Orchestration should not have completed"
270-
# except TimeoutError:
270+
# except (TimeoutError, _InactiveRpcError):
271271
# pass
272272

273273
# # Resume the orchestration and wait for it to complete

tests/durabletask/test_orchestration_e2e.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
from durabletask import client, task, worker
1212

13+
from grpc._channel import _InactiveRpcError
14+
1315
# NOTE: These tests assume a sidecar process is running. Example command:
1416
# go install github.com/microsoft/durabletask-go@main
1517
# durabletask-go --port 4001
@@ -244,9 +246,9 @@ def orchestrator(ctx: task.OrchestrationContext, _):
244246
# Raise an event to the orchestration and confirm that it does NOT complete
245247
task_hub_client.raise_orchestration_event(id, "my_event", data=42)
246248
try:
247-
state = task_hub_client.wait_for_orchestration_completion(id, timeout=30)
249+
state = task_hub_client.wait_for_orchestration_completion(id, timeout=3)
248250
assert False, "Orchestration should not have completed"
249-
except TimeoutError:
251+
except (TimeoutError, _InactiveRpcError):
250252
pass
251253

252254
# Resume the orchestration and wait for it to complete

0 commit comments

Comments
 (0)