From 04b431064320fc7cf71d8489e91d8ffc15e4256d Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Wed, 1 Jul 2026 05:31:09 -0700 Subject: [PATCH] test(moa): loosen parallel-fan-out timing threshold to tolerate CI jitter (#56377) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test_references_run_in_parallel asserted elapsed < 0.9 for two 0.5s sleeps that run concurrently. On a loaded CI runner, thread-pool startup pushed the wall time to 0.9001s — a 0.14ms miss — flaking the shard. Loosen to < 0.95, which still sits well below the 1.0s serial floor, so a genuine serialization regression (>=1.0s) still fails hard. --- tests/run_agent/test_moa_loop_mode.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/run_agent/test_moa_loop_mode.py b/tests/run_agent/test_moa_loop_mode.py index 8e93ad53d..04c7d51ce 100644 --- a/tests/run_agent/test_moa_loop_mode.py +++ b/tests/run_agent/test_moa_loop_mode.py @@ -566,7 +566,10 @@ def test_references_run_in_parallel(monkeypatch): elapsed = time.monotonic() - start # Two 0.5s sleeps run concurrently → well under the 1.0s serial floor. - assert elapsed < 0.9, f"references did not run in parallel (took {elapsed:.2f}s)" + # Threshold sits at 0.95s (not tight against 0.5s) to tolerate CI + # thread-pool startup jitter while still failing hard if the two calls + # ran serially (which would be ≥1.0s). + assert elapsed < 0.95, f"references did not run in parallel (took {elapsed:.2f}s)" # Output order matches input order (stable Reference N labelling). assert [label for label, _, _ in out] == ["p1:ok", "moa:preset", "p2:boom", "p3:ok"] assert "recursively reference MoA" in out[1][1]