Skip to content

Commit 7663404

Browse files
vdusekclaude
andauthored
test: Relax timing assertion in test_abort_works to fix flaky test (#1754)
## Summary - `test_abort_works` was flaky on CI due to an overly tight timing assertion (`< 0.3s`), which left only ~0.2s of headroom after the initial `asyncio.sleep(0.1)`. - Relaxed the threshold to `5s`, which still validates that `abort()` cancels tasks promptly (vs the 60s task sleep) while being resilient to CI scheduling jitter. ## Failed CI runs - https://github.com/apify/crawlee-python/actions/runs/22064841619/job/63753881516 - https://github.com/apify/crawlee-python/actions/runs/22095987878/job/63853075484 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 40fdccd commit 7663404

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/unit/_autoscaling/test_autoscaled_pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ async def run() -> None:
8787
await run_task
8888

8989
assert elapsed.wall is not None
90-
assert elapsed.wall < 0.3
90+
assert elapsed.wall < 5
9191

9292

9393
async def test_propagates_exceptions(system_status: SystemStatus | Mock) -> None:

0 commit comments

Comments
 (0)