Skip to content

Commit b6efad5

Browse files
committed
Bump task_timeout on debug-mode test to tolerate CI contention
The test_workflow_runs_on_main_thread_in_debug_mode test passes locally in 0.3s against time-skipping, localhost dev-server, and under -n auto parallelism, but hangs in CI against the bundled dev server. Most likely the server's default workflow task timeout (10s) is being raced by inline-activation latency under heavy CI parallel load, causing task reassignment and a stuck client awaiting completion. Set task_timeout=timedelta(minutes=2) on the workflow as a conservative temporary mitigation while we diagnose. If CI goes green with this change the theory holds. If still red, the issue is elsewhere and this should come back out.
1 parent 1471165 commit b6efad5

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/worker/test_breakpoint_hang.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import sys
1818
import threading
1919
import uuid
20+
from datetime import timedelta
2021

2122
from temporalio import workflow
2223
from temporalio.client import Client
@@ -78,6 +79,12 @@ async def test_workflow_runs_on_main_thread_in_debug_mode(client: Client):
7879
ThreadCaptureWorkflow.run,
7980
id=f"wf-{uuid.uuid4()}",
8081
task_queue=task_queue,
82+
# Conservative task_timeout to tolerate CI contention. The inline
83+
# activation blocks the asyncio loop briefly; under heavy parallel
84+
# CI load this can race the server's default workflow task timeout
85+
# and cause task reassignment. Temporary mitigation while we
86+
# diagnose the CI-specific hang against the bundled dev server.
87+
task_timeout=timedelta(minutes=2),
8188
)
8289

8390
main_name = threading.main_thread().name

0 commit comments

Comments
 (0)