2222import com .google .cloud .bigtable .data .v2 .BigtableDataClient ;
2323import com .google .cloud .bigtable .data .v2 .BigtableDataSettings ;
2424import com .google .common .base .MoreObjects ;
25+ import com .google .common .base .Strings ;
2526import java .io .IOException ;
2627import 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