-
Notifications
You must be signed in to change notification settings - Fork 280
Possible race condition in credential refresh #692
Copy link
Copy link
Closed
Labels
priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.status: investigatingThe issue is under investigation, which is determined to be non-trivial.The issue is under investigation, which is determined to be non-trivial.
Metadata
Metadata
Assignees
Labels
priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.status: investigatingThe issue is under investigation, which is determined to be non-trivial.The issue is under investigation, which is determined to be non-trivial.
We are seeing a possible race condition around credential refresh. We use the following code in an integration test suite to fetch OAuth2 tokens:
We expect the
credentialsto contain a valid access token at the end of the if-else block. However, our tests intermittently fail by throwing aNullPointerExceptionattoken.getTokenValue(). Any thoughts on what might be going on here? What should we do to ensure thatgetAccessToken()always returns a non-null value?Note: In the failing tests,
forceRefreshhas been set tofalse. So it should execute thecredentials.getRequestMetadata()path.