Skip to content

Commit b10703d

Browse files
committed
Compilation error fixes.
1 parent 9cb5dc2 commit b10703d

File tree

6 files changed

+15
-3
lines changed

6 files changed

+15
-3
lines changed

google-auth-library-java/oauth2_http/javatests/com/google/auth/oauth2/AwsCredentialsTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
package com.google.auth.oauth2;
3333

3434
import static com.google.auth.Credentials.GOOGLE_DEFAULT_UNIVERSE;
35+
import static org.junit.jupiter.api.Assertions.fail;
3536
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
3637
import static org.junit.jupiter.api.Assertions.assertEquals;
3738
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -56,6 +57,8 @@
5657
import java.util.HashMap;
5758
import java.util.List;
5859
import java.util.Map;
60+
61+
import org.junit.jupiter.api.Assertions;
5962
import org.junit.jupiter.api.Test;
6063

6164
/** Tests for {@link AwsCredentials}. */
@@ -1409,7 +1412,7 @@ private void waitForRegionalAccessBoundary(GoogleCredentials credentials)
14091412
Thread.sleep(100);
14101413
}
14111414
if (credentials.getRegionalAccessBoundary() == null) {
1412-
fail("Timed out waiting for regional access boundary refresh");
1415+
Assertions.fail("Timed out waiting for regional access boundary refresh");
14131416
}
14141417
}
14151418
}

google-auth-library-java/oauth2_http/javatests/com/google/auth/oauth2/ComputeEngineCredentialsTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import static com.google.auth.oauth2.ComputeEngineCredentials.METADATA_RESPONSE_EMPTY_CONTENT_ERROR_MESSAGE;
3535
import static com.google.auth.oauth2.ImpersonatedCredentialsTest.SA_CLIENT_EMAIL;
3636
import static com.google.auth.oauth2.RegionalAccessBoundary.X_ALLOWED_LOCATIONS_HEADER_KEY;
37+
import static org.junit.jupiter.api.Assertions.fail;
3738
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
3839
import static org.junit.jupiter.api.Assertions.assertEquals;
3940
import static org.junit.jupiter.api.Assertions.assertFalse;

google-auth-library-java/oauth2_http/javatests/com/google/auth/oauth2/ExternalAccountAuthorizedUserCredentialsTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
package com.google.auth.oauth2;
3333

3434
import static com.google.auth.Credentials.GOOGLE_DEFAULT_UNIVERSE;
35+
import static org.junit.jupiter.api.Assertions.fail;
3536
import static org.junit.jupiter.api.Assertions.assertEquals;
3637
import static org.junit.jupiter.api.Assertions.assertFalse;
3738
import static org.junit.jupiter.api.Assertions.assertNotEquals;
@@ -43,6 +44,7 @@
4344
import com.google.api.client.http.HttpTransport;
4445
import com.google.api.client.json.GenericJson;
4546
import com.google.api.client.testing.http.MockLowLevelHttpRequest;
47+
import com.google.api.client.util.Clock;
4648
import com.google.auth.TestUtils;
4749
import com.google.auth.http.AuthHttpConstants;
4850
import com.google.auth.http.HttpTransportFactory;
@@ -61,6 +63,8 @@
6163
import java.util.HashMap;
6264
import java.util.List;
6365
import java.util.Map;
66+
67+
import org.junit.jupiter.api.Assertions;
6468
import org.junit.jupiter.api.BeforeEach;
6569
import org.junit.jupiter.api.Test;
6670

@@ -1237,7 +1241,7 @@ void serialize() throws IOException, ClassNotFoundException {
12371241
assertEquals(credentials, deserializedCredentials);
12381242
assertEquals(credentials.hashCode(), deserializedCredentials.hashCode());
12391243
assertEquals(credentials.toString(), deserializedCredentials.toString());
1240-
assertSame(Clock.SYSTEM, deserializedCredentials.clock);
1244+
assertSame(com.google.api.client.util.Clock.SYSTEM, deserializedCredentials.clock);
12411245
}
12421246

12431247
@org.junit.jupiter.api.Test
@@ -1278,7 +1282,7 @@ private void waitForRegionalAccessBoundary(GoogleCredentials credentials)
12781282
Thread.sleep(100);
12791283
}
12801284
if (credentials.getRegionalAccessBoundary() == null) {
1281-
fail("Timed out waiting for regional access boundary refresh");
1285+
Assertions.fail("Timed out waiting for regional access boundary refresh");
12821286
}
12831287
}
12841288

google-auth-library-java/oauth2_http/javatests/com/google/auth/oauth2/IdentityPoolCredentialsTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
import static com.google.auth.oauth2.MockExternalAccountCredentialsTransport.SERVICE_ACCOUNT_IMPERSONATION_URL;
3636
import static com.google.auth.oauth2.OAuth2Utils.JSON_FACTORY;
3737
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
38+
import static org.junit.jupiter.api.Assertions.assertNull;
39+
import static org.junit.jupiter.api.Assertions.fail;
3840
import static org.junit.jupiter.api.Assertions.assertEquals;
3941
import static org.junit.jupiter.api.Assertions.assertNotNull;
4042
import static org.junit.jupiter.api.Assertions.assertSame;

google-auth-library-java/oauth2_http/javatests/com/google/auth/oauth2/ImpersonatedCredentialsTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
package com.google.auth.oauth2;
3333

3434
import static com.google.auth.oauth2.RegionalAccessBoundary.X_ALLOWED_LOCATIONS_HEADER_KEY;
35+
import static org.junit.jupiter.api.Assertions.fail;
3536
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
3637
import static org.junit.jupiter.api.Assertions.assertEquals;
3738
import static org.junit.jupiter.api.Assertions.assertFalse;

google-auth-library-java/oauth2_http/javatests/com/google/auth/oauth2/PluggableAuthCredentialsTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import static org.junit.jupiter.api.Assertions.assertEquals;
3737
import static org.junit.jupiter.api.Assertions.assertNull;
3838
import static org.junit.jupiter.api.Assertions.assertThrows;
39+
import static org.junit.jupiter.api.Assertions.fail;
3940

4041
import com.google.api.client.http.HttpTransport;
4142
import com.google.api.client.json.GenericJson;

0 commit comments

Comments
 (0)