Skip to content

build: fix auth library native tests and flaky test#12881

Merged
meltsufin merged 7 commits intomainfrom
fix-auth-native-tests
Apr 22, 2026
Merged

build: fix auth library native tests and flaky test#12881
meltsufin merged 7 commits intomainfrom
fix-auth-native-tests

Conversation

@meltsufin
Copy link
Copy Markdown
Member

@meltsufin meltsufin commented Apr 21, 2026

The google-auth-library-java migration to the monorepo inadvertently enabled GraalVM native testing for the credentials module because the generic graalvm-single job type runs tests on all modules in the subdirectory. In the original repository, this job was scoped to only test the oauth2_http module.

This change adds <skipNativeTests>true</skipNativeTests> to the credentials and appengine module POMs to skip native tests, resolving the failure when the plugin cannot find test configuration files. It also stabilizes a flaky concurrent test in cab-token-generator.

Fixes #12859

The google-auth-library-java migration to the monorepo inadvertently enabled GraalVM native testing for the credentials module because the generic graalvm-single job type runs tests on all modules in the subdirectory. In the original repository, this job was carefully scoped to only test the oauth2_http module.

This change adds <skipNativeTests>true</skipNativeTests> to the credentials module POM to skip native tests, resolving the failure when the plugin cannot find test configuration files.

Fixes #12859
@meltsufin meltsufin requested review from a team as code owners April 21, 2026 20:18
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds the native-maven-plugin to the credentials module's pom.xml and configures it to skip native tests. I have no feedback to provide.

meltsufin and others added 6 commits April 21, 2026 20:35
The google-auth-library-oauth2-http module fails to compile in the GraalVM job because the slf4j package is not found. In the original repository, this job was executed with the -Pslf4j2x profile activated, which adds the dependency.

This change adds -Pslf4j2x to INTEGRATION_TEST_ARGS in the job configuration file.

Fixes #12889
The refreshCredentialsIfRequired_asyncMultiThread test was failing because the mock clock was returning a fixed stale time, causing multiple threads to trigger redundant refreshes if they didn't overlap perfectly.

This change modifies the mock clock to return a stale time on the first call (to trigger the async refresh) and a fresh time on subsequent calls (to skip redundant refreshes). This fix is isolated to only the ASYNC test case to avoid breaking BLOCKING tests.
chore: fix formatting in cab token generator tests to comply with project style rules.
The google-auth-library-appengine module was failing the native test phase because it lacked the necessary GraalVM test configuration file. This change skips native tests for this module, consistent with what we did for the credentials module.
@meltsufin meltsufin changed the title build: skip native tests for credentials module build: fix auth library native tests and flaky test Apr 22, 2026
@meltsufin meltsufin merged commit 8a25165 into main Apr 22, 2026
159 of 161 checks passed
@meltsufin meltsufin deleted the fix-auth-native-tests branch April 22, 2026 17:41
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.

Auth graalVM tests failed

4 participants