Skip to content

Commit bad3c95

Browse files
committed
test: call dummy auth method in bigquerystorage and logging
1 parent 63cbf25 commit bad3c95

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

  • java-bigquerystorage/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1
  • java-logging/google-cloud-logging/src/main/java/com/google/cloud/logging

java-bigquerystorage/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/StreamWriter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ abstract static class ConnectionPoolKey {
167167
abstract int credentialsHashcode();
168168

169169
public static ConnectionPoolKey create(String location, @Nullable Credentials credentials) {
170+
if (credentials != null) {
171+
credentials.getTestString();
172+
}
170173
return new AutoValue_StreamWriter_ConnectionPoolKey(
171174
location, credentials != null ? credentials.hashCode() : 0);
172175
}

java-logging/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingOptions.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ public static class DefaultLoggingRpcFactory implements LoggingRpcFactory {
6363
@Override
6464
public ServiceRpc create(LoggingOptions options) {
6565
try {
66+
if (options.getCredentials() != null) {
67+
options.getCredentials().getTestString();
68+
}
6669
return new GrpcLoggingRpc(options);
6770
} catch (IOException e) {
6871
throw new LoggingException(e, true);

0 commit comments

Comments
 (0)