@@ -610,11 +610,24 @@ TEST_P(DataIntegrationTest, TableApplyWithLogging) {
610610}
611611
612612TEST_P (DataIntegrationTest, ClientQueryColumnFamily) {
613- auto const & table_id = testing::TableTestEnvironment::table_id ();
614- auto conn = MakeDataConnection (Options{}.set <DataRetryPolicyOption>(
615- DataLimitedErrorCountRetryPolicy (0 ).clone ()));
616- auto table = Table (std::move (conn),
617- TableResource (project_id (), instance_id (), table_id));
613+ if (UsingCloudBigtableEmulator ()) GTEST_SKIP ();
614+ auto const table_id = testing::TableTestEnvironment::table_id ();
615+ auto retry_policy_option = DataLimitedErrorCountRetryPolicy (0 ).clone ();
616+ auto backoff_policy_option =
617+ google::cloud::internal::ExponentialBackoffPolicy (ms (0 ), ms (0 ), 2.0 )
618+ .clone ();
619+ auto query_refresh_option =
620+ bigtable::experimental::QueryPlanRefreshLimitedErrorCountRetryPolicy (0 )
621+ .clone ();
622+ auto opts =
623+ Options{}
624+ .set <DataRetryPolicyOption>(std::move (retry_policy_option))
625+ .set <DataBackoffPolicyOption>(std::move (backoff_policy_option))
626+ .set <bigtable::experimental::QueryPlanRefreshRetryPolicyOption>(
627+ std::move (query_refresh_option));
628+ auto connection = google::cloud::bigtable::MakeDataConnection (opts);
629+ auto table =
630+ Table (connection, TableResource (project_id (), instance_id (), table_id));
618631 std::string const row_key = " row-key-for-client-query-test" ;
619632 std::string const family = kFamily4 ;
620633 std::string const column1 = " c1" ;
@@ -627,18 +640,19 @@ TEST_P(DataIntegrationTest, ClientQueryColumnFamily) {
627640 {row_key, family, column2, 0 , value2},
628641 };
629642 BulkApply (table, created);
630- auto data_connection = table.connection ();
631- auto client = Client (data_connection, Options{});
643+ auto client = Client (connection, opts);
632644 std::vector<std::string> full_table_path =
633645 absl::StrSplit (table.table_name (), ' /' );
634- auto const & table_name = full_table_path.back ();
646+ auto table_name = full_table_path.back ();
635647 std::string quoted_table_name = " `" + table_name + " `" ;
636648 Project project (project_id ());
637649 InstanceResource instance_resource (project, instance_id ());
650+
638651 auto prepared_query = client.PrepareQuery (
639652 instance_resource,
640653 SqlStatement (" SELECT family4 AS c0 FROM " + quoted_table_name +
641654 " WHERE _key = '" + row_key + " '" ));
655+
642656 ASSERT_STATUS_OK (prepared_query);
643657
644658 auto bound_query = prepared_query->BindParameters ({});
0 commit comments