fix(fhir): no-issue: stabilise flaky Patient given-name filter test#10100
Open
passcod wants to merge 2 commits into
Open
fix(fhir): no-issue: stabilise flaky Patient given-name filter test#10100passcod wants to merge 2 commits into
passcod wants to merge 2 commits into
Conversation
|
🦸 Review Hero Summary No issues found. Looks good! |
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.
Changes
🤖 The materialised FHIR test
Patient › filters patients by firstName (given)is flaky.It creates three patients (two named "John", one "Bob") and asserts
given=Johnreturns 2. But the FHIRgivensearch is a case-insensitive prefix match (^John) overname.given, which is materialised as[firstName, middleName].fake()assigns each patient a randommiddleName, and roughly 0.4% of the time the "Bob" patient's middleName starts with "John" (e.g. "Johnson", "Johnathan"), so it matches too and the count is 3 — about 1 failure in every ~250 runs.The fix pins
middleName: nullon the three patients so only the explicitfirstNamedrives the match.Auto-Deploy
Options
Tests
Review Hero
.github/review-hero/suppressions.yml. Also runs automatically at the end of any auto-fix run.Remember to...