Commit ce7de1d
committed
Fix flaky LangGraph timeout tests
The test activities slept for 1s with a 100ms start_to_close_timeout.
Since Temporal does not actively cancel an activity when
start_to_close_timeout fires (it just rejects late completions), the
server processing the activity completion raced with it processing the
timeout, and on slow runners (Windows CI) the completion sometimes
won — causing test_timeout to fail with "DID NOT RAISE
WorkflowFailureError".
Increase the activity sleep to 30s so the timer reliably fires long
before the activity could complete naturally. Worker-shutdown
cancellation cleans up the still-sleeping activity when the test exits
its `async with Worker(...)` block, so runtime is unchanged.
Same fix applied to slow_task, used by the otherwise-identical pattern
in test_per_task_activity_options_override.1 parent f6e113d commit ce7de1d
2 files changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
138 | 143 | | |
139 | 144 | | |
140 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
0 commit comments