Improve reliability of session timeout spec#8676
Merged
Conversation
mitchellhenke
approved these changes
Jun 28, 2023
changelog: Internal, Automated Tests, Improve reliability of tests
181dbf2 to
be45b33
Compare
Merged
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.
🛠 Summary of changes
This tries to improve the reliability of a spec which has seen intermittent failures in builds.
Example failure: https://gitlab.login.gov/lg/identity-idp/-/jobs/541333
The hypothesis is that, because the spec stubs the timeout delay to occur immediately on page load, the
Warden.on_next_requestcall in the Ruby code happens after the request in the browser, so the forced session expiration doesn't take effect, as it would be another 30 seconds before a subsequent poll request.The proposed solution is to increase the poll frequency so that even if the first request misses the Warden request stubbing, the next request a second later would catch it.
This also adds a couple other unrelated improvements:
skip_trackableassignment.last_request_at, and the old/activeendpoint actually extended the Warden session. See related discussion at Update session timeout poll response handling to omit timeout on inactive session #8521 (comment). The new endpoint assigns this property to avoid extending the Warden session.📜 Testing Plan
Build should pass.