Skip to content

Conversation

@Avery-Dunn
Copy link
Contributor

@Avery-Dunn Avery-Dunn commented Nov 5, 2025

See #5357

GetRemovesExpired_Async in ThrottlingCacheTests is flaky in our pipelines, occasionally failing due to the "k1" cache entry not being expired/removed like we expect it to. The TestCleanup_Async test in that class does the same expiry checks, except it isn't flaky.

My suspicion is a race condition caused by the task delay: TestCleanup_Async used a 50ms delay, however GetRemovesExpired_Async used a 1ms delay which is the same as the expiry time. A lack of precision in the timing could be causing us to check the cache before the entry is actually expired.

This PR aims to fix that by removing the delay logic entirely, and simply sets the cache entries to already be expired when they're created.

@Avery-Dunn Avery-Dunn requested a review from a team as a code owner November 5, 2025 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants