Skip to content

Conversation

@tvernum
Copy link
Contributor

@tvernum tvernum commented Dec 15, 2020

The testExpiredTokensDeletedAfterExpiration method assumed that
invalidating a refresh token immediately after the delete task was run
would behave as if the token did not exist.

However, the Elasticsearch concurrency controls do not guarantee that
behaviour. It is possible for the request that searches for the token
document the corresponds to the refresh token to find an invalidated
but not yet deleted document which is reflected in the API response.

This change makes the test resilient to this behaviour by wrapping the
assertion in an assertBusy

Backport of: #64757

The testExpiredTokensDeletedAfterExpiration method assumed that
invalidating a refresh token immediately after the delete task was run
would behave as if the token did not exist.

However, the Elasticsearch concurrency controls do not guarantee that
behaviour. It is possible for the request that searches for the token
document the corresponds to the refresh token to find an invalidated
but not yet deleted document which is reflected in the API response.

This change makes the test resilient to this behaviour by wrapping the
assertion in an assertBusy

Backport of: elastic#64757
@DaveCTurner
Copy link
Contributor

DaveCTurner commented Jan 12, 2021

I suspect https://gradle-enterprise.elastic.co/s/m2opl5u64rlmc/console-log?task=:x-pack:plugin:security:internalClusterTest is related to this backport.

No that doesn't make sense, I thought I was looking at a 7.x failure but actually it was in master.

@tvernum tvernum closed this Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants