diff --git a/.kokoro/presubmit/google-auth-library-java-graalvm-native-presubmit.cfg b/.kokoro/presubmit/google-auth-library-java-graalvm-native-presubmit.cfg index 15cf4809e57e..0cef3c4ff61b 100644 --- a/.kokoro/presubmit/google-auth-library-java-graalvm-native-presubmit.cfg +++ b/.kokoro/presubmit/google-auth-library-java-graalvm-native-presubmit.cfg @@ -50,3 +50,9 @@ env_vars: { key: "BUILD_SUBDIR" value: "google-auth-library-java" } + +env_vars: { + key: "INTEGRATION_TEST_ARGS" + value: "-Pslf4j2x" +} + diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index 9cbef9e2cdee..5acc011becd1 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -1259,7 +1259,7 @@ com.google.cloud google-cloud-spanner-bom - 6.116.0 + 6.116.1 pom import diff --git a/google-auth-library-java/appengine/pom.xml b/google-auth-library-java/appengine/pom.xml index 0af59fd0d985..77bdd254cc7a 100644 --- a/google-auth-library-java/appengine/pom.xml +++ b/google-auth-library-java/appengine/pom.xml @@ -42,6 +42,14 @@ + + org.graalvm.buildtools + native-maven-plugin + + true + + + diff --git a/google-auth-library-java/cab-token-generator/javatests/com/google/auth/credentialaccessboundary/ClientSideCredentialAccessBoundaryFactoryTest.java b/google-auth-library-java/cab-token-generator/javatests/com/google/auth/credentialaccessboundary/ClientSideCredentialAccessBoundaryFactoryTest.java index bfe9077c990f..99cbbbda90f1 100644 --- a/google-auth-library-java/cab-token-generator/javatests/com/google/auth/credentialaccessboundary/ClientSideCredentialAccessBoundaryFactoryTest.java +++ b/google-auth-library-java/cab-token-generator/javatests/com/google/auth/credentialaccessboundary/ClientSideCredentialAccessBoundaryFactoryTest.java @@ -614,22 +614,28 @@ private Clock createMockClock(RefreshType refreshType, GoogleCredentials sourceC // Set mocked time so that the token is fresh and no refresh is needed (before the refresh // margin). mockedTimeInMillis = expirationTimeInMillis - refreshMarginInMillis - 60000; + when(mockClock.currentTimeMillis()).thenReturn(mockedTimeInMillis); break; case ASYNC: // Set mocked time so that the token is nearing expiry and an async refresh is triggered // (within the refresh margin). mockedTimeInMillis = expirationTimeInMillis - refreshMarginInMillis + 60000; + when(mockClock.currentTimeMillis()) + .thenReturn( + mockedTimeInMillis, // First call: Stale (triggers the async refresh) + currentTimeInMillis // Subsequent calls: Fresh (skips redundant refreshes) + ); break; case BLOCKING: // Set mocked time so that the token requires immediate refresh (just after the minimum // token lifetime). mockedTimeInMillis = expirationTimeInMillis - minimumTokenLifetimeMillis + 60000; + when(mockClock.currentTimeMillis()).thenReturn(mockedTimeInMillis); break; default: throw new IllegalArgumentException("Unexpected RefreshType: " + refreshType); } - when(mockClock.currentTimeMillis()).thenReturn(mockedTimeInMillis); return mockClock; } diff --git a/google-auth-library-java/credentials/pom.xml b/google-auth-library-java/credentials/pom.xml index 62cff4c16bb8..7d80fde4a5ac 100644 --- a/google-auth-library-java/credentials/pom.xml +++ b/google-auth-library-java/credentials/pom.xml @@ -22,6 +22,13 @@ java javatests + + org.graalvm.buildtools + native-maven-plugin + + true + + org.apache.maven.plugins maven-source-plugin