From 35414a42a9042c90a1028983284b62221145ec9d Mon Sep 17 00:00:00 2001 From: goodboy Date: Wed, 24 Jun 2026 12:32:24 -0400 Subject: [PATCH] Scale `test_most_beautiful_word` deadline for CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flat `trio.fail_after(1)` wraps a whole actor spawn + IPC round-trip in `test_most_beautiful_word` — sub-second on a warm box, but slow/noisy CI runners (esp. macOS) blow the 1s deadline with a `trio.TooSlowError`. Scale the budget by `cpu_scaling_factor()`: a strict `1s` locally (factor `1.0`), CI/CPU-throttle headroom (~3x) on macOS. Review: PR #465 (copilot + self CI-triage) https://github.com/goodboy/tractor/pull/465#pullrequestreview-4548191641 (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code --- tests/test_spawning.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_spawning.py b/tests/test_spawning.py index 63a2fb8e..d12c9b28 100644 --- a/tests/test_spawning.py +++ b/tests/test_spawning.py @@ -150,7 +150,12 @@ async def test_most_beautiful_word( The main ``tractor`` routine. ''' - with trio.fail_after(1): + # actor spawn + IPC round-trip is comfortably sub-second on a + # warm box, but slow/noisy CI runners (esp. macOS) blow a flat + # 1s deadline. Scale for CI/CPU-throttle headroom — `== 1s` + # locally where `cpu_scaling_factor()` is `1.0`. + from .conftest import cpu_scaling_factor + with trio.fail_after(1 * cpu_scaling_factor()): async with tractor.open_nursery( debug_mode=debug_mode, ) as an: