test(moa): loosen parallel-fan-out timing threshold to tolerate CI jitter (#56377)
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.
This commit is contained in:
parent
d68d2716a7
commit
04b4310643
1 changed files with 4 additions and 1 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue