-
Notifications
You must be signed in to change notification settings - Fork 7.9k
SessionTimeoutsTest flaky test fix #21684
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
Conversation
martin-kanis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wburns Thank you for the investigation and the fix. It looks good to me, however some other model tests failed. I'm not able to reproduce the failures locally.
I'm going to run more experiments in GHA to see if there is any problem.
I am not familiar with the other tests, but is it possible the test was inserting expired entries on accident and assuming it was not expired? It could be related to needing a pause to assert that an entry was inserted at the proper time like you did in #21701 |
|
Rebased to main |
|
So I wasn't able to reproduce errors locally but it appeared again when I run model tests 10 times in GHA. In the logs, I see this error again but I don't see a connection between the error and changes in this PR. |
|
With the "fix", there is still one timeout. It is happening also in |
martin-kanis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I just noticed the second commit. @wburns Can you please squash the commits?
|
@wburns / @martin-kanis - I think the second commit is a merge commit, and I can squash this when merging PR. Ideally I'd like to see only one commit (as Martin mentioned), but I can fix this (hopefully) by pressing the right buttons here. |
ahus1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving as per @martin-kanis's approval.
…21684) Fixes part of keycloak#20983 (cherry picked from commit de04684)
|
Oh weird, sorry about the merge commit. I thought the rebase button did a rebase :( |
Closes #20983
Due to the replication happening a later point, the test could run in such a way that the session replication write to the cache was performed after the session had already "expired". In this test specifically the maxIdle would be -2 which SessionTimeouts signals as it is expired. This value of -2 was then passed to the ISPN cache which is inferred to be it cannot expire via maxIdle and thus it would not expire.
Note that this is only one of two issues I identified with the flaky test, but this one happens much more frequently. Please check #20983 or other issues regarding the other issue with the test that is not fixed here.