Skip to content

Commit 81b9666

Browse files
committed
skip query snippet execution when using the emulator
1 parent e90d136 commit 81b9666

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

google/cloud/bigtable/examples/data_snippets.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -912,10 +912,11 @@ void RunDataExamples(
912912
std::cout << "Running ReadModifyWrite() example [3]" << std::endl;
913913
ReadModifyWrite(table, {"read-modify-write"});
914914

915-
auto client = cbt::Client(cbt::MakeDataConnection());
916-
std::cout << "Running PrepareAndExecuteQuery() example" << std::endl;
917-
PrepareAndExecuteQuery(client, {project_id, instance_id, table_id});
918-
915+
if (!google::cloud::bigtable::examples::UsingEmulator()) {
916+
auto client = cbt::Client(cbt::MakeDataConnection());
917+
std::cout << "Running PrepareAndExecuteQuery() example" << std::endl;
918+
PrepareAndExecuteQuery(client, {project_id, instance_id, table_id});
919+
}
919920
admin.DeleteTable(schema->name());
920921
}
921922

0 commit comments

Comments
 (0)