1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2026-02-15 07:27:13 +00:00
Files
supervisor/tests/jobs
Stefan Agner 3db60170aa Fix flaky test_group_throttle_rate_limit race condition (#6504)
The test was failing intermittently in CI because concurrent async
operations in asyncio.gather() were getting slightly different
timestamps (microseconds apart) despite being inside a time_machine
context.

When test2.execute() calls were timestamped at start+2ms due to async
scheduling delays, they weren't cleaned up in the final test block
(cutoff = start+1ms), causing a false rate limit error.

Fix by using tick=False to completely freeze time during the gather,
ensuring all 4 calls get the exact same timestamp.

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-30 17:17:50 +01:00
..