Skip to content

Commit 7d1610f

Browse files
authored
chore: Update GceTestEnvConfig to use ServiceAccountCredential.fromStream() (googleapis#4176)
1 parent d28af84 commit 7d1610f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

google-cloud-spanner/src/test/java/com/google/cloud/spanner/GceTestEnvConfig.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import static com.google.common.base.Preconditions.checkState;
2222

2323
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
24-
import com.google.auth.oauth2.GoogleCredentials;
24+
import com.google.auth.oauth2.ServiceAccountCredentials;
2525
import com.google.cloud.spanner.spi.v1.SpannerInterceptorProvider;
2626
import io.grpc.CallOptions;
2727
import io.grpc.Channel;
@@ -80,7 +80,8 @@ public GceTestEnvConfig() {
8080
}
8181
if (!credentialsFile.isEmpty()) {
8282
try {
83-
builder.setCredentials(GoogleCredentials.fromStream(new FileInputStream(credentialsFile)));
83+
builder.setCredentials(
84+
ServiceAccountCredentials.fromStream(new FileInputStream(credentialsFile)));
8485
} catch (IOException e) {
8586
throw new RuntimeException(e);
8687
}

0 commit comments

Comments
 (0)