fix(tests): Use unique email in flaky custom auth integration test#7113
fix(tests): Use unique email in flaky custom auth integration test#7113matthewelwell wants to merge 1 commit intomainfrom
Conversation
The test was using a hardcoded `test@example.com` that appears in 15+ other tests in the same file. Under certain xdist worker orderings this caused a 400 "Email already exists" validation error instead of the expected 201, making the test flaky. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, reopen this pull request to trigger a review.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Docker builds report
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7113 +/- ##
=======================================
Coverage 98.33% 98.33%
=======================================
Files 1335 1335
Lines 49939 49939
=======================================
Hits 49109 49109
Misses 830 830 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
test_register__with_sign_up_type__stores_sign_up_typeused the hardcoded emailtest@example.com, which appears in 15+ other tests in the same file. Under certain xdist worker orderings, another test'stest@example.comuser was visible through the same DB session when theUniqueValidatorran, causing a 400 "Email already exists" response instead of the expected 201 (as seen in https://github.com/Flagsmith/flagsmith/actions/runs/23909436003/job/69727179889).f"test-{uuid.uuid4()}@example.com"settingsfixture parameterHow did you test this code?
The flaky failure was observed in CI. The fix removes the shared email that was causing non-deterministic collisions under parallel xdist execution.