Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try: Fix second MFA reminder flakey spec #11109

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

aduth
Copy link
Contributor

@aduth aduth commented Aug 19, 2024

🛠 Summary of changes

Attempts to resolve an issue where the "Second MFA Reminder user with multiple mfas who would otherwise be candidate does not prompt the user on sign in" spec occasionally fails in continuous integration.

Example: https://gitlab.login.gov/lg/identity-idp/-/jobs/1371605

It's not entirely clear what causes this, but it's hypothesized that something with the time travel in the existing implementation results in the user arriving at the sign-in page rather than the account page.

The changes here reorganize the test to avoid relying on time helpers, and instead stub the user in a way where the account is old enough to be prompted for the second MFA reminder.

This also has the upside of avoiding magic numbers within the test (travel 6.days), using the default configuration values instead.

Easiest to review with whitespace changes hidden: https://github.com/18F/identity-idp/pull/11109/files?w=1

📜 Testing Plan

Verify that the build passes.

changelog: Internal, Automated Testing, Improve reliability of automated tests
@aduth aduth requested a review from a team August 19, 2024 13:14
@aduth aduth merged commit 2c81950 into main Aug 19, 2024
2 checks passed
@aduth aduth deleted the aduth-try-flakey-test-fix-second-mfa branch August 19, 2024 13:36
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.

2 participants