Skip to content

The agent that grows with you

test: warm the compression pool before the hung-commit overrun case

Teknium605e40459341
diff --git a/tests/agent/test_compression_review.py b/tests/agent/test_compression_review.py
index d7c49aad0e1..c6480df9456 100644
--- a/tests/agent/test_compression_review.py
+++ b/tests/agent/test_compression_review.py
@@ -87,11 +87,12 @@ class TestF1CommitOverrunWhileHung:
)
try:
+ # Warm the pool's thread first: the fence rightly refuses a worker that starts after the
+ # 1s commit deadline, and spawning a cold pool thread on a starved runner took longer.
+ executor.submit(lambda: None).result(timeout=30)
t = threading.Thread(target=run, name="f1-hung-commit-host")
t.start()
try:
- # Generous: Event.wait returns the moment it is set; a cold executor under load
- # can take over 2s just to start the worker.
assert entered.wait(timeout=10)
# ── Assert WHILE the commit worker is still blocked ──────
assert overrun_fired.wait(timeout=10), (