Fix flaky test_submissions_are_random_by_user#4527
Merged
marcoacierno merged 1 commit intomainfrom Jan 10, 2026
Merged
Conversation
The test was flaky because with only 3 submissions there are only 6 possible orderings (3!), giving a ~33% chance that two users would get the same random ordering. Changes: - Increased submissions from 3 to 10 (10! = ~3.6M possible orderings) - Reduced from 3 users to 2 users (only need to verify difference) - Added consistency test: same user gets same ordering on repeated queries - Improved documentation explaining the test logic Fixes #4526 Co-authored-by: Marco Acierno <marcoacierno@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4527 +/- ##
=======================================
Coverage 94.42% 94.42%
=======================================
Files 352 352
Lines 10141 10141
Branches 732 732
=======================================
Hits 9576 9576
Misses 468 468
Partials 97 97 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixed the flaky
test_submissions_are_random_by_usertest by increasing the number of submissions and improving the test logic.Changes
Fixes #4526
🤖 Generated with Claude Code