test: fix directpath tests (#2556) · googleapis/java-bigtable@a46793a · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Commit a46793a

Browse files
test: fix directpath tests (#2556)
Change-Id: Ie1d14cc80ef26b4f35f6005d5d213d4cf436d950 Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Rollback plan is reviewed and LGTMed - [ ] All new data plane features have a completed end to end testing plan Fixes #<issue_number_goes_here> ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md).
1 parent 1a2c3f0 commit a46793a

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/DirectPathFallbackIT.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
import static com.google.common.truth.TruthJUnit.assume;
2020

2121
import com.google.api.core.ApiFunction;
22-
import com.google.api.gax.core.FixedCredentialsProvider;
2322
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
24-
import com.google.auth.oauth2.ComputeEngineCredentials;
2523
import com.google.cloud.bigtable.data.v2.BigtableDataClient;
2624
import com.google.cloud.bigtable.data.v2.BigtableDataSettings;
2725
import com.google.cloud.bigtable.test_helpers.env.AbstractTestEnv.ConnectionMode;
@@ -127,9 +125,7 @@ public ManagedChannelBuilder apply(ManagedChannelBuilder builder) {
127125

128126
settingsBuilder
129127
.stubSettings()
130-
.setTransportChannelProvider(instrumentedTransportChannelProvider)
131-
// Forcefully ignore GOOGLE_APPLICATION_CREDENTIALS
132-
.setCredentialsProvider(FixedCredentialsProvider.create(ComputeEngineCredentials.create()));
128+
.setTransportChannelProvider(instrumentedTransportChannelProvider);
133129

134130
instrumentedClient = BigtableDataClient.create(settingsBuilder.build());
135131
}

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ExecuteQueryIT.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import com.google.cloud.bigtable.data.v2.models.sql.ResultSet;
2929
import com.google.cloud.bigtable.data.v2.models.sql.SqlType;
3030
import com.google.cloud.bigtable.data.v2.models.sql.Struct;
31+
import com.google.cloud.bigtable.test_helpers.env.AbstractTestEnv;
3132
import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv;
3233
import com.google.cloud.bigtable.test_helpers.env.TestEnvRule;
3334
import com.google.protobuf.ByteString;
@@ -59,6 +60,12 @@ public static void setUpAll() throws IOException {
5960
.withMessage("ExecuteQuery is not supported on Emulator")
6061
.that(testEnvRule.env())
6162
.isNotInstanceOf(EmulatorEnv.class);
63+
assume()
64+
.withMessage("ExecuteQuery only works over CloudPath")
65+
.that(testEnvRule.env().getConnectionMode())
66+
.isNoneOf(
67+
AbstractTestEnv.ConnectionMode.REQUIRE_DIRECT_PATH,
68+
AbstractTestEnv.ConnectionMode.REQUIRE_DIRECT_PATH_IPV4);
6269

6370
tableId = testEnvRule.env().getTableId();
6471
dataClient = testEnvRule.env().getDataClient();

0 commit comments

Comments
 (0)

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.