1818#include " google/cloud/bigtable/instance_config.h"
1919#include " google/cloud/bigtable/table_config.h"
2020#include " google/cloud/bigtable/testing/table_integration_test.h"
21+ #include " google/cloud/location/locations.pb.h"
2122#include " google/cloud/common_options.h"
2223#include " google/cloud/internal/getenv.h"
2324#include " google/cloud/internal/random.h"
25+ #include " google/cloud/location.h"
2426#include " google/cloud/testing_util/chrono_literals.h"
2527#include " google/cloud/testing_util/scoped_environment.h"
2628#include " google/cloud/testing_util/scoped_log.h"
@@ -40,6 +42,8 @@ using ::testing::HasSubstr;
4042using ::testing::IsSupersetOf;
4143using ::testing::Not;
4244
45+ using ::google::cloud::bigtable::testing::TableTestEnvironment;
46+
4347namespace btadmin = ::google::bigtable::admin::v2;
4448
4549class TableAdminIntegrationTest
@@ -252,7 +256,7 @@ TEST_F(TableAdminIntegrationTest, CreateListGetDeleteTable) {
252256TEST_F (TableAdminIntegrationTest, WaitForConsistencyCheck) {
253257 // WaitForConsistencyCheck() only makes sense on a replicated table, we need
254258 // to create an instance with at least 2 clusters to test it.
255- auto const id = bigtable::testing:: TableTestEnvironment::RandomInstanceId ();
259+ auto const id = TableTestEnvironment::RandomInstanceId ();
256260 auto const random_table_id = RandomTableId ();
257261
258262 // Create a bigtable::InstanceAdmin and a bigtable::TableAdmin to create the
@@ -270,12 +274,14 @@ TEST_F(TableAdminIntegrationTest, WaitForConsistencyCheck) {
270274 // they must be in different zones. Also, the display name cannot be longer
271275 // than 30 characters.
272276 auto display_name = (" IT " + id).substr (0 , 30 );
273- auto cluster_config_1 =
274- bigtable::ClusterConfig (bigtable::testing::TableTestEnvironment::zone_a (),
275- 3 , bigtable::ClusterConfig::HDD);
276- auto cluster_config_2 =
277- bigtable::ClusterConfig (bigtable::testing::TableTestEnvironment::zone_b (),
278- 3 , bigtable::ClusterConfig::HDD);
277+ auto location_1 = Location (Project (TableTestEnvironment::project_id ()),
278+ TableTestEnvironment::zone_a ());
279+ auto location_2 = Location (Project (TableTestEnvironment::project_id ()),
280+ TableTestEnvironment::zone_b ());
281+ auto cluster_config_1 = bigtable::ClusterConfig (location_1.FullName (), 3 ,
282+ bigtable::ClusterConfig::HDD);
283+ auto cluster_config_2 = bigtable::ClusterConfig (location_2.FullName (), 3 ,
284+ bigtable::ClusterConfig::HDD);
279285 bigtable::InstanceConfig config (
280286 id, display_name,
281287 {{id + " -c1" , cluster_config_1}, {id + " -c2" , cluster_config_2}});
0 commit comments