From 066011b83d1a20fb086ea820a62f22c05fc90a4b Mon Sep 17 00:00:00 2001 From: goodboy Date: Fri, 13 Mar 2026 18:47:58 -0400 Subject: [PATCH] Bump `fail_after` delay on non-linux for sync-sleep test Use 6s timeout on non-linux (vs 4s) in `test_cancel_while_childs_child_in_sync_sleep()` to avoid flaky `TooSlowError` on slower CI runners. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code --- tests/test_cancellation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_cancellation.py b/tests/test_cancellation.py index 7d14df12..d3555d37 100644 --- a/tests/test_cancellation.py +++ b/tests/test_cancellation.py @@ -649,7 +649,11 @@ def test_cancel_while_childs_child_in_sync_sleep( # # delay = 1 # no AssertionError in eg, TooSlowError raised. # delay = 2 # is AssertionError in eg AND no TooSlowError !? - delay = 4 # is AssertionError in eg AND no _cs cancellation. + # is AssertionError in eg AND no _cs cancellation. + delay = ( + 6 if _non_linux + else 4 + ) with trio.fail_after(delay) as _cs: # with trio.CancelScope() as cs: