Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Commit 6e1f284

Browse files
fix tests - dont try to fetch credentials when the client doesnt need them part 2
Change-Id: I7b446d2f0e5951a160659dd628c9ef00f47af04c
1 parent 6a19488 commit 6e1f284

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/Client.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,11 @@ public static Client create(ClientSettings settings) throws IOException {
9494
// TODO: compat layer: get this from settings
9595
String universeDomain = "googleapis.com";
9696

97-
GoogleCredentials credentials = GoogleCredentials.getApplicationDefault();
98-
9997
Metrics metrics;
10098
if (settings.getChannelProvider() instanceof ChannelProviders.EmulatorChannelProvider) {
10199
metrics = new NoopMetrics();
102100
} else {
101+
GoogleCredentials credentials = GoogleCredentials.getApplicationDefault();
103102
MetricRegistry registry = new MetricRegistry();
104103
OpenTelemetrySdk otel =
105104
MetricsImpl.createBuiltinOtel(

0 commit comments

Comments
 (0)