Skip to content

fix(ring): Fix flaky TestMinimizeSpreadTokenGenerator#7484

Open
yeya24 wants to merge 1 commit intocortexproject:masterfrom
yeya24:fix-token-generator-flaky-test
Open

fix(ring): Fix flaky TestMinimizeSpreadTokenGenerator#7484
yeya24 wants to merge 1 commit intocortexproject:masterfrom
yeya24:fix-token-generator-flaky-test

Conversation

@yeya24
Copy link
Copy Markdown
Contributor

@yeya24 yeya24 commented May 6, 2026

Increase the token distribution tolerance from 0.01 (1%) to 0.02 (2%). The minimize-spread algorithm is probabilistic and can occasionally produce distributions slightly over 1% error, causing flaky failures. A 2% tolerance still validates the algorithm works correctly.

What this PR does:

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
  • docs/configuration/v1-guarantees.md updated if this PR introduces experimental flags

Increase the token distribution tolerance from 0.01 (1%) to 0.02 (2%).
The minimize-spread algorithm is probabilistic and can occasionally
produce distributions slightly over 1% error, causing flaky failures.
A 2% tolerance still validates the algorithm works correctly.

Signed-off-by: Ben Ye <benye@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant