Repository navigation
test: pin member search fixtures against Faker collisions - #3044
Merged
Merged
Conversation
The admin member search spec is flaky: the search matches name and email with ILIKE '%Julie%', and the fabricated members draw random Faker names and emails. A draw containing "julie" (about 0.09% per member) turns the single expected match into two, the controller then renders the pick list instead of redirecting, and the path assertion fails. This showed up once in CI on PR #3042 (Tests Group 0, 2026-10-16). Pinning the three fixtures makes the match deterministic.
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.
The
admin member searchfeature spec is flaky. This makes it deterministic. The failure showed up once in PR #3042 CI (Tests Group 0, 2026-10-16) and is unrelated to that PR's diff.Problem
Member.find_members_by_namematches name and email withILIKE '%Julie%'. The spec fabricated three members with random Faker names and emails. Faker produces a name or email containing "julie" in about 0.09% of draws, measured over 200,000 draws, so roughly 1 run in 300 finds a second match. The controller then renders the pick list instead of redirecting to the results page, and the path assertion fails.Change
Pin the names and emails of the three fabricated members, so the search term can only match Juliet.
Review notes
Nothing risky: the diff touches one spec file and pins its fixtures. Worth a glance at the comment above the scenario, which records the collision mechanism so nobody re-randomises the fixtures.