Skip to content

Commit 12169d6

Browse files
chore: use prod endpoint for directpath tests (#119)
* chore: use prod endpoint for directpath tests * oops * use client default endpoints by default * collapse empty xml nodes
1 parent c106497 commit 12169d6

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

google-cloud-bigtable/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
<skipTests>false</skipTests>
2323
<skipUnitTests>${skipTests}</skipUnitTests>
2424

25-
<bigtable.cfe-data-endpoint>bigtable.googleapis.com:443</bigtable.cfe-data-endpoint>
26-
<bigtable.cfe-admin-endpoint>bigtableadmin.googleapis.com:443</bigtable.cfe-admin-endpoint>
27-
28-
<!-- Use test DP env until prod endpoint is available -->
29-
<bigtable.directpath-data-endpoint>testdirectpath-bigtable.sandbox.googleapis.com:443</bigtable.directpath-data-endpoint>
30-
<bigtable.directpath-admin-endpoint>test-bigtableadmin.sandbox.googleapis.com:443</bigtable.directpath-admin-endpoint>
25+
<!-- Use client defined default endpoints -->
26+
<!-- Can be overriden on the commandline via `-Dbigtable.cfe-data-endpoint=bigtableadmin.googleapis.com:443` -->
27+
<bigtable.cfe-data-endpoint/>
28+
<bigtable.cfe-admin-endpoint/>
29+
<bigtable.directpath-data-endpoint/>
30+
<bigtable.directpath-admin-endpoint/>
3131
</properties>
3232
<dependencies>
3333
<!-- NOTE: Dependencies are organized into two groups, production and test.

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import com.google.cloud.bigtable.data.v2.BigtableDataClient;
2323
import com.google.cloud.bigtable.data.v2.BigtableDataSettings;
2424
import com.google.common.base.MoreObjects;
25+
import com.google.common.base.Strings;
2526
import java.io.IOException;
2627
import javax.annotation.Nullable;
2728

@@ -57,8 +58,8 @@ class CloudEnv extends AbstractTestEnv {
5758

5859
static CloudEnv fromSystemProperties() {
5960
return new CloudEnv(
60-
getOptionalProperty(DATA_ENDPOINT_PROPERTY_NAME, "bigtable.googleapis.com:443"),
61-
getOptionalProperty(ADMIN_ENDPOINT_PROPERTY_NAME, "bigtableadmin.googleapis.com:443"),
61+
getOptionalProperty(DATA_ENDPOINT_PROPERTY_NAME, ""),
62+
getOptionalProperty(ADMIN_ENDPOINT_PROPERTY_NAME, ""),
6263
getRequiredProperty(PROJECT_PROPERTY_NAME),
6364
getRequiredProperty(INSTANCE_PROPERTY_NAME),
6465
getRequiredProperty(TABLE_PROPERTY_NAME));
@@ -76,18 +77,18 @@ private CloudEnv(
7677

7778
this.dataSettings =
7879
BigtableDataSettings.newBuilder().setProjectId(projectId).setInstanceId(instanceId);
79-
if (dataEndpoint != null) {
80+
if (!Strings.isNullOrEmpty(dataEndpoint)) {
8081
dataSettings.stubSettings().setEndpoint(dataEndpoint);
8182
}
8283

8384
this.tableAdminSettings =
8485
BigtableTableAdminSettings.newBuilder().setProjectId(projectId).setInstanceId(instanceId);
85-
if (adminEndpoint != null) {
86+
if (!Strings.isNullOrEmpty(adminEndpoint)) {
8687
this.tableAdminSettings.stubSettings().setEndpoint(adminEndpoint);
8788
}
8889

8990
this.instanceAdminSettings = BigtableInstanceAdminSettings.newBuilder().setProjectId(projectId);
90-
if (adminEndpoint != null) {
91+
if (!Strings.isNullOrEmpty(adminEndpoint)) {
9192
this.instanceAdminSettings.stubSettings().setEndpoint(adminEndpoint);
9293
}
9394
}

0 commit comments

Comments
 (0)