Skip to content

test: pin member search fixtures against Faker collisions - #3044

Merged
mroderick merged 1 commit into
masterfrom
fix/flaky-admin-member-search-faker-collision
Oct 16, 2026
Merged

mroderick merged 1 commit into
masterfrom
fix/flaky-admin-member-search-faker-collision

Conversation

@mroderick

Copy link
Copy Markdown
Collaborator

The admin member search feature 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_name matches name and email with ILIKE '%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.

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.
@mroderick
mroderick marked this pull request as ready for review October 16, 2026 10:57
@mroderick
mroderick merged commit 17602de into master Oct 16, 2026
11 checks passed
@mroderick
mroderick deleted the fix/flaky-admin-member-search-faker-collision branch October 16, 2026 10:57
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.

1 participant