Skip to content

Improve reliability of session timeout spec#8676

Merged
aduth merged 1 commit intomainfrom
aduth-session-timeout-spec-reliability
Jun 29, 2023
Merged

Improve reliability of session timeout spec#8676
aduth merged 1 commit intomainfrom
aduth-session-timeout-spec-reliability

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Jun 28, 2023

🛠 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_request call 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:

📜 Testing Plan

Build should pass.

changelog: Internal, Automated Tests, Improve reliability of tests
@aduth aduth force-pushed the aduth-session-timeout-spec-reliability branch from 181dbf2 to be45b33 Compare June 28, 2023 18:29
@aduth aduth merged commit 3d765ea into main Jun 29, 2023
@aduth aduth deleted the aduth-session-timeout-spec-reliability branch June 29, 2023 13:23
@mdiarra3 mdiarra3 mentioned this pull request Jun 29, 2023
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