Skip to content
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

Fix token refresh test case in PolarisApplicationIntegrationTest #629

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

dimas-b
Copy link
Contributor

@dimas-b dimas-b commented Jan 8, 2025

Remove unnecessary Mockito Spies. Overriding token expiry time is not necessary for these tests.

Use normal AuthConfig builder for setting the OAuth2 URI.

Overriding token expiry time is not necessary for these tests.

Use normal `AuthConfig` builder for setting the OAuth2 URI.
@dimas-b dimas-b changed the title Remove unnecessary Mockito spies from PolarisApplicationIntegrationTest Fix token refresh test case in PolarisApplicationIntegrationTest Jan 8, 2025
@dimas-b dimas-b merged commit 0e8731c into apache:main Jan 8, 2025
5 checks passed
@dimas-b dimas-b deleted the remove-spies branch January 8, 2025 23:04
dimas-b added a commit to dimas-b/polaris that referenced this pull request Jan 9, 2025
Use an explicit fake and expired token as input to the Iceberg's
`AuthSession` to force it to obtain a real token from Polaris
at session creation time.

This is a follow-up to apache#629. Before that PR, the test depended
heavily on Iceberg's `AuthSession` code. It still depends on that,
but to a lesser extent. Now, the input token is already expired, so
the test only needs to validate that a new token was obtained.
@dimas-b dimas-b mentioned this pull request Jan 9, 2025
adutra pushed a commit that referenced this pull request Jan 9, 2025
Use an explicit fake and expired token as input to the Iceberg's
`AuthSession` to force it to obtain a real token from Polaris
at session creation time.

This is a follow-up to #629. Before that PR, the test depended
heavily on Iceberg's `AuthSession` code. It still depends on that,
but to a lesser extent. Now, the input token is already expired, so
the test only needs to validate that a new token was obtained.
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