Skip to content

Deflake TestSearchEventsLimiter/with_limiter#64092

Open
zmb3 wants to merge 1 commit intomasterfrom
zmb3/test-search-limiter
Open

Deflake TestSearchEventsLimiter/with_limiter#64092
zmb3 wants to merge 1 commit intomasterfrom
zmb3/test-search-limiter

Conversation

@zmb3
Copy link
Collaborator

@zmb3 zmb3 commented Feb 25, 2026

The test was flaky because on slow CI systems the code that exhausts the rate limit could end up taking longer than the 20ms refill interval. If the token is replentished then the subsequent request that should be rate limited ends up succeeding without error.

Running the test in a synctest bubble where time is controlled prevents this from being an issue. The token isn't replentished until we explicitly sleep to trigger the refill.

Closes #59652

The test was flaky because on slow CI systems the code that exhausts
the rate limit could end up taking longer than the 20ms refill interval.
If the token is replentished then the subsequent request that should be
rate limited ends up succeeding without error.

Running the test in a synctest bubble where time is controlled prevents
this from being an issue. The token isn't replentished until we
explicitly sleep to trigger the refill.

Closes #59652
@zmb3 zmb3 requested a review from rosstimothy February 25, 2026 18:48
@zmb3 zmb3 added no-changelog Indicates that a PR does not require a changelog entry backport/branch/v17 backport/branch/v18 labels Feb 25, 2026
@github-actions github-actions bot added audit-log Issues related to Teleports Audit Log size/sm labels Feb 25, 2026
@zmb3 zmb3 enabled auto-merge February 25, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit-log Issues related to Teleports Audit Log backport/branch/v17 backport/branch/v18 no-changelog Indicates that a PR does not require a changelog entry size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TestSearchEventsLimiter/with_limiter flakiness

2 participants