From 380909a3fe053284a9ee8f81cd504d29433597c7 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Tue, 17 Feb 2026 12:12:17 +0100 Subject: [PATCH] fix: Relax timing assertion in `test_abort_works` to fix flaky test The test asserts that aborting the pool completes quickly rather than waiting for the full 60s task sleep. The previous 0.3s threshold left only ~0.2s after the initial `asyncio.sleep(0.1)`, which was too tight on loaded CI runners. Increase to 5s which still validates the abort behavior while being resilient to scheduling jitter. Co-Authored-By: Claude Opus 4.6 --- tests/unit/_autoscaling/test_autoscaled_pool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/_autoscaling/test_autoscaled_pool.py b/tests/unit/_autoscaling/test_autoscaled_pool.py index f95c324deb..74a3a75c60 100644 --- a/tests/unit/_autoscaling/test_autoscaled_pool.py +++ b/tests/unit/_autoscaling/test_autoscaled_pool.py @@ -87,7 +87,7 @@ async def run() -> None: await run_task assert elapsed.wall is not None - assert elapsed.wall < 0.3 + assert elapsed.wall < 5 async def test_propagates_exceptions(system_status: SystemStatus | Mock) -> None: