From 39f72bc1f5b6b1d87327603a8f59cf9081179bc3 Mon Sep 17 00:00:00 2001 From: Anna Levenberg Date: Wed, 6 Dec 2023 13:33:59 -0500 Subject: [PATCH 01/10] fix(pubsub): get future value before returning --- google/cloud/pubsub/internal/tracing_batch_sink.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/cloud/pubsub/internal/tracing_batch_sink.cc b/google/cloud/pubsub/internal/tracing_batch_sink.cc index 8850baebea9d9..d11ba0aab5744 100644 --- a/google/cloud/pubsub/internal/tracing_batch_sink.cc +++ b/google/cloud/pubsub/internal/tracing_batch_sink.cc @@ -178,7 +178,7 @@ class TracingBatchSink : public BatchSink { internal::EndSpan(*span); } internal::DetachOTelContext(oc); - return f; + return f.get(); }); } From 0c33f9b1a71a32b1aabd97a0a3b3d12995faeaf8 Mon Sep 17 00:00:00 2001 From: Anna Levenberg Date: Thu, 7 Dec 2023 09:00:53 -0500 Subject: [PATCH 02/10] test(pubsub): add regression integration test --- .../pubsub/integration_tests/CMakeLists.txt | 7 +- .../publisher_integration_test.cc | 129 ++++++++++++++++++ .../pubsub_client_integration_tests.bzl | 1 + 3 files changed, 135 insertions(+), 2 deletions(-) create mode 100644 google/cloud/pubsub/integration_tests/publisher_integration_test.cc diff --git a/google/cloud/pubsub/integration_tests/CMakeLists.txt b/google/cloud/pubsub/integration_tests/CMakeLists.txt index af1c8ea3361ca..8252294de01e6 100644 --- a/google/cloud/pubsub/integration_tests/CMakeLists.txt +++ b/google/cloud/pubsub/integration_tests/CMakeLists.txt @@ -23,8 +23,11 @@ function (google_cloud_cpp_pubsub_define_integration_tests) set(pubsub_client_integration_tests # cmake-format: sort - blocking_publisher_integration_test.cc subscriber_integration_test.cc - subscription_admin_integration_test.cc topic_admin_integration_test.cc) + blocking_publisher_integration_test.cc + publisher_integration_test.cc + subscriber_integration_test.cc + subscription_admin_integration_test.cc + topic_admin_integration_test.cc) # Export the list of unit tests to a .bzl file so we do not need to maintain # the list in two places. diff --git a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc new file mode 100644 index 0000000000000..7fd33626f0e7b --- /dev/null +++ b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc @@ -0,0 +1,129 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "google/cloud/pubsub/admin/topic_admin_client.h" +#include "google/cloud/pubsub/publisher.h" +#include "google/cloud/pubsub/testing/random_names.h" +#include "google/cloud/pubsub/testing/test_retry_policies.h" +#include "google/cloud/pubsub/version.h" +#include "google/cloud/credentials.h" +#include "google/cloud/internal/getenv.h" +#include "google/cloud/internal/random.h" +#include "google/cloud/testing_util/integration_test.h" +#include "google/cloud/testing_util/opentelemetry_matchers.h" +#include "google/cloud/testing_util/status_matchers.h" +#include +#include + +namespace google { +namespace cloud { +namespace pubsub { +GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN +namespace { + +using ::google::cloud::testing_util::IsOk; +using ::google::cloud::testing_util::StatusIs; +using ::testing::AnyOf; + +class PublisherIntegrationTest + : public ::google::cloud::testing_util::IntegrationTest { + protected: + void SetUp() override { + auto project_id = + google::cloud::internal::GetEnv("GOOGLE_CLOUD_PROJECT").value_or(""); + ASSERT_FALSE(project_id.empty()); + generator_ = google::cloud::internal::DefaultPRNG(std::random_device{}()); + topic_ = Topic(project_id, "my-topic"); + topic_ = Topic(project_id, pubsub_testing::RandomTopicId(generator_)); + + auto topic_admin = pubsub_admin::TopicAdminClient( + pubsub_admin::MakeTopicAdminConnection()); + + auto topic_metadata = topic_admin.CreateTopic(topic_.FullName()); + ASSERT_THAT(topic_metadata, + AnyOf(IsOk(), StatusIs(StatusCode::kAlreadyExists))); + } + + void TearDown() override { + auto topic_admin = pubsub_admin::TopicAdminClient( + pubsub_admin::MakeTopicAdminConnection()); + + auto delete_topic = topic_admin.DeleteTopic(topic_.FullName()); + EXPECT_THAT(delete_topic, AnyOf(IsOk(), StatusIs(StatusCode::kNotFound))); + } + + google::cloud::internal::DefaultPRNG generator_; + Topic topic_ = Topic("unused", "unused"); +}; + +TEST_F(PublisherIntegrationTest, Basic) { + auto options = + Options{}.set(MakeGoogleDefaultCredentials()); + auto const using_emulator = + internal::GetEnv("PUBSUB_EMULATOR_HOST").has_value(); + if (using_emulator) { + options = Options{} + .set(MakeInsecureCredentials()) + .set(true); + } + auto publisher = Publisher(MakePublisherConnection(topic_, options)); + auto publish = + publisher.Publish(MessageBuilder().SetData("test data").Build()).get(); + ASSERT_STATUS_OK(publish); +} + +#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY +using ::google::cloud::testing_util::DisableTracing; +using ::google::cloud::testing_util::EnableTracing; + +TEST_F(PublisherIntegrationTest, TracingEnabled) { + auto options = + Options{}.set(MakeGoogleDefaultCredentials()); + auto const using_emulator = + internal::GetEnv("PUBSUB_EMULATOR_HOST").has_value(); + if (using_emulator) { + options = Options{} + .set(MakeInsecureCredentials()) + .set(true); + } + auto publisher = + Publisher(MakePublisherConnection(topic_, EnableTracing(options))); + auto publish = + publisher.Publish(MessageBuilder().SetData("test data").Build()).get(); + ASSERT_STATUS_OK(publish); +} + +TEST_F(PublisherIntegrationTest, TracingDisabled) { + auto options = + Options{}.set(MakeGoogleDefaultCredentials()); + auto const using_emulator = + internal::GetEnv("PUBSUB_EMULATOR_HOST").has_value(); + if (using_emulator) { + options = Options{} + .set(MakeInsecureCredentials()) + .set(true); + } + auto publisher = + Publisher(MakePublisherConnection(topic_, DisableTracing(options))); + auto publish = + publisher.Publish(MessageBuilder().SetData("test data").Build()).get(); + ASSERT_STATUS_OK(publish); +} +#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY + +} // namespace +GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END +} // namespace pubsub +} // namespace cloud +} // namespace google diff --git a/google/cloud/pubsub/integration_tests/pubsub_client_integration_tests.bzl b/google/cloud/pubsub/integration_tests/pubsub_client_integration_tests.bzl index f8e974abe6eaf..8e671b7445f92 100644 --- a/google/cloud/pubsub/integration_tests/pubsub_client_integration_tests.bzl +++ b/google/cloud/pubsub/integration_tests/pubsub_client_integration_tests.bzl @@ -18,6 +18,7 @@ pubsub_client_integration_tests = [ "blocking_publisher_integration_test.cc", + "publisher_integration_test.cc", "subscriber_integration_test.cc", "subscription_admin_integration_test.cc", "topic_admin_integration_test.cc", From 73e76cf5967cc6eace5be38b9223505de5dc8019 Mon Sep 17 00:00:00 2001 From: Anna Levenberg Date: Thu, 7 Dec 2023 09:52:02 -0500 Subject: [PATCH 03/10] refactor --- .../publisher_integration_test.cc | 48 ++++++------------- 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc index 7fd33626f0e7b..908de013e4596 100644 --- a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc +++ b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc @@ -44,11 +44,19 @@ class PublisherIntegrationTest google::cloud::internal::GetEnv("GOOGLE_CLOUD_PROJECT").value_or(""); ASSERT_FALSE(project_id.empty()); generator_ = google::cloud::internal::DefaultPRNG(std::random_device{}()); - topic_ = Topic(project_id, "my-topic"); topic_ = Topic(project_id, pubsub_testing::RandomTopicId(generator_)); + auto options = + Options{}.set(MakeGoogleDefaultCredentials()); + auto const using_emulator = + internal::GetEnv("PUBSUB_EMULATOR_HOST").has_value(); + if (using_emulator) { + options = Options{} + .set(MakeInsecureCredentials()) + .set(true); + } auto topic_admin = pubsub_admin::TopicAdminClient( - pubsub_admin::MakeTopicAdminConnection()); + pubsub_admin::MakeTopicAdminConnection(options_)); auto topic_metadata = topic_admin.CreateTopic(topic_.FullName()); ASSERT_THAT(topic_metadata, @@ -57,27 +65,19 @@ class PublisherIntegrationTest void TearDown() override { auto topic_admin = pubsub_admin::TopicAdminClient( - pubsub_admin::MakeTopicAdminConnection()); + pubsub_admin::MakeTopicAdminConnection(options_)); auto delete_topic = topic_admin.DeleteTopic(topic_.FullName()); EXPECT_THAT(delete_topic, AnyOf(IsOk(), StatusIs(StatusCode::kNotFound))); } + google::cloud::Options options_; google::cloud::internal::DefaultPRNG generator_; Topic topic_ = Topic("unused", "unused"); }; TEST_F(PublisherIntegrationTest, Basic) { - auto options = - Options{}.set(MakeGoogleDefaultCredentials()); - auto const using_emulator = - internal::GetEnv("PUBSUB_EMULATOR_HOST").has_value(); - if (using_emulator) { - options = Options{} - .set(MakeInsecureCredentials()) - .set(true); - } - auto publisher = Publisher(MakePublisherConnection(topic_, options)); + auto publisher = Publisher(MakePublisherConnection(topic_, options_)); auto publish = publisher.Publish(MessageBuilder().SetData("test data").Build()).get(); ASSERT_STATUS_OK(publish); @@ -88,34 +88,16 @@ using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; TEST_F(PublisherIntegrationTest, TracingEnabled) { - auto options = - Options{}.set(MakeGoogleDefaultCredentials()); - auto const using_emulator = - internal::GetEnv("PUBSUB_EMULATOR_HOST").has_value(); - if (using_emulator) { - options = Options{} - .set(MakeInsecureCredentials()) - .set(true); - } auto publisher = - Publisher(MakePublisherConnection(topic_, EnableTracing(options))); + Publisher(MakePublisherConnection(topic_, EnableTracing(options_))); auto publish = publisher.Publish(MessageBuilder().SetData("test data").Build()).get(); ASSERT_STATUS_OK(publish); } TEST_F(PublisherIntegrationTest, TracingDisabled) { - auto options = - Options{}.set(MakeGoogleDefaultCredentials()); - auto const using_emulator = - internal::GetEnv("PUBSUB_EMULATOR_HOST").has_value(); - if (using_emulator) { - options = Options{} - .set(MakeInsecureCredentials()) - .set(true); - } auto publisher = - Publisher(MakePublisherConnection(topic_, DisableTracing(options))); + Publisher(MakePublisherConnection(topic_, DisableTracing(options_))); auto publish = publisher.Publish(MessageBuilder().SetData("test data").Build()).get(); ASSERT_STATUS_OK(publish); From 13b38d7a2126f758e4d12a99e6f332c345803d16 Mon Sep 17 00:00:00 2001 From: Anna Levenberg Date: Thu, 7 Dec 2023 16:19:02 -0500 Subject: [PATCH 04/10] fix options --- .../pubsub/integration_tests/publisher_integration_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc index 908de013e4596..35f5234936378 100644 --- a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc +++ b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc @@ -45,12 +45,12 @@ class PublisherIntegrationTest ASSERT_FALSE(project_id.empty()); generator_ = google::cloud::internal::DefaultPRNG(std::random_device{}()); topic_ = Topic(project_id, pubsub_testing::RandomTopicId(generator_)); - auto options = + options_ = Options{}.set(MakeGoogleDefaultCredentials()); auto const using_emulator = internal::GetEnv("PUBSUB_EMULATOR_HOST").has_value(); if (using_emulator) { - options = Options{} + options_ = Options{} .set(MakeInsecureCredentials()) .set(true); } From a061069d6ea73c29e0adf3804acb9e5a660ad363 Mon Sep 17 00:00:00 2001 From: Anna Levenberg Date: Fri, 8 Dec 2023 09:25:09 -0500 Subject: [PATCH 05/10] use old admin --- .../publisher_integration_test.cc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc index 908de013e4596..37773540fb4c0 100644 --- a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc +++ b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "google/cloud/pubsub/admin/topic_admin_client.h" +#include "google/cloud/pubsub/topic_admin_client.h" #include "google/cloud/pubsub/publisher.h" #include "google/cloud/pubsub/testing/random_names.h" #include "google/cloud/pubsub/testing/test_retry_policies.h" @@ -55,19 +55,17 @@ class PublisherIntegrationTest .set(true); } - auto topic_admin = pubsub_admin::TopicAdminClient( - pubsub_admin::MakeTopicAdminConnection(options_)); - - auto topic_metadata = topic_admin.CreateTopic(topic_.FullName()); + auto topic_admin = + pubsub::TopicAdminClient(pubsub::MakeTopicAdminConnection()); + auto topic_metadata = topic_admin.CreateTopic(TopicBuilder(topic_)); ASSERT_THAT(topic_metadata, AnyOf(IsOk(), StatusIs(StatusCode::kAlreadyExists))); } void TearDown() override { - auto topic_admin = pubsub_admin::TopicAdminClient( - pubsub_admin::MakeTopicAdminConnection(options_)); - - auto delete_topic = topic_admin.DeleteTopic(topic_.FullName()); + auto topic_admin = + pubsub::TopicAdminClient(pubsub::MakeTopicAdminConnection()); + auto delete_topic = topic_admin.DeleteTopic(topic_); EXPECT_THAT(delete_topic, AnyOf(IsOk(), StatusIs(StatusCode::kNotFound))); } From 4b8237719b8e63cba5a4ce3e9734a348f468467b Mon Sep 17 00:00:00 2001 From: Anna Levenberg Date: Fri, 8 Dec 2023 11:08:41 -0500 Subject: [PATCH 06/10] checkers --- .../pubsub/integration_tests/publisher_integration_test.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc index 7aca320c82b77..f7c8bb299309f 100644 --- a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc +++ b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "google/cloud/pubsub/topic_admin_client.h" #include "google/cloud/pubsub/publisher.h" #include "google/cloud/pubsub/testing/random_names.h" #include "google/cloud/pubsub/testing/test_retry_policies.h" +#include "google/cloud/pubsub/topic_admin_client.h" #include "google/cloud/pubsub/version.h" #include "google/cloud/credentials.h" #include "google/cloud/internal/getenv.h" @@ -51,8 +51,8 @@ class PublisherIntegrationTest internal::GetEnv("PUBSUB_EMULATOR_HOST").has_value(); if (using_emulator) { options_ = Options{} - .set(MakeInsecureCredentials()) - .set(true); + .set(MakeInsecureCredentials()) + .set(true); } auto topic_admin = From 932c9a9e0b8bf769cbdefafae1cdb9b4f26c54a4 Mon Sep 17 00:00:00 2001 From: Anna Levenberg Date: Fri, 8 Dec 2023 14:23:16 -0500 Subject: [PATCH 07/10] Revert "use old admin" This reverts commit a061069d6ea73c29e0adf3804acb9e5a660ad363. --- .../publisher_integration_test.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc index f7c8bb299309f..178d6d02d8857 100644 --- a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc +++ b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "google/cloud/pubsub/admin/topic_admin_client.h" #include "google/cloud/pubsub/publisher.h" #include "google/cloud/pubsub/testing/random_names.h" #include "google/cloud/pubsub/testing/test_retry_policies.h" @@ -55,17 +56,19 @@ class PublisherIntegrationTest .set(true); } - auto topic_admin = - pubsub::TopicAdminClient(pubsub::MakeTopicAdminConnection()); - auto topic_metadata = topic_admin.CreateTopic(TopicBuilder(topic_)); + auto topic_admin = pubsub_admin::TopicAdminClient( + pubsub_admin::MakeTopicAdminConnection(options_)); + + auto topic_metadata = topic_admin.CreateTopic(topic_.FullName()); ASSERT_THAT(topic_metadata, AnyOf(IsOk(), StatusIs(StatusCode::kAlreadyExists))); } void TearDown() override { - auto topic_admin = - pubsub::TopicAdminClient(pubsub::MakeTopicAdminConnection()); - auto delete_topic = topic_admin.DeleteTopic(topic_); + auto topic_admin = pubsub_admin::TopicAdminClient( + pubsub_admin::MakeTopicAdminConnection(options_)); + + auto delete_topic = topic_admin.DeleteTopic(topic_.FullName()); EXPECT_THAT(delete_topic, AnyOf(IsOk(), StatusIs(StatusCode::kNotFound))); } From 104630a910e79d6788c6ff9d22dfcecf98f8a010 Mon Sep 17 00:00:00 2001 From: Anna Levenberg Date: Fri, 8 Dec 2023 14:26:54 -0500 Subject: [PATCH 08/10] remove ifdefs --- .../integration_tests/publisher_integration_test.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc index 178d6d02d8857..2cd4284c027cf 100644 --- a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc +++ b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc @@ -19,6 +19,7 @@ #include "google/cloud/pubsub/topic_admin_client.h" #include "google/cloud/pubsub/version.h" #include "google/cloud/credentials.h" +#include "google/cloud/opentelemetry_options.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/random.h" #include "google/cloud/testing_util/integration_test.h" @@ -84,26 +85,23 @@ TEST_F(PublisherIntegrationTest, Basic) { ASSERT_STATUS_OK(publish); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY -using ::google::cloud::testing_util::DisableTracing; -using ::google::cloud::testing_util::EnableTracing; - TEST_F(PublisherIntegrationTest, TracingEnabled) { + options_.set(true); auto publisher = - Publisher(MakePublisherConnection(topic_, EnableTracing(options_))); + Publisher(MakePublisherConnection(topic_, options_)); auto publish = publisher.Publish(MessageBuilder().SetData("test data").Build()).get(); ASSERT_STATUS_OK(publish); } TEST_F(PublisherIntegrationTest, TracingDisabled) { + options_.set(true); auto publisher = - Publisher(MakePublisherConnection(topic_, DisableTracing(options_))); + Publisher(MakePublisherConnection(topic_, options_)); auto publish = publisher.Publish(MessageBuilder().SetData("test data").Build()).get(); ASSERT_STATUS_OK(publish); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END From d256044f0ac1312caeb4854b992d25acf1a35f56 Mon Sep 17 00:00:00 2001 From: Anna Levenberg Date: Fri, 8 Dec 2023 14:27:54 -0500 Subject: [PATCH 09/10] remove default credentials --- .../integration_tests/publisher_integration_test.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc index 2cd4284c027cf..8b5e03c2807ae 100644 --- a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc +++ b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc @@ -19,9 +19,9 @@ #include "google/cloud/pubsub/topic_admin_client.h" #include "google/cloud/pubsub/version.h" #include "google/cloud/credentials.h" -#include "google/cloud/opentelemetry_options.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/random.h" +#include "google/cloud/opentelemetry_options.h" #include "google/cloud/testing_util/integration_test.h" #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" @@ -47,8 +47,7 @@ class PublisherIntegrationTest ASSERT_FALSE(project_id.empty()); generator_ = google::cloud::internal::DefaultPRNG(std::random_device{}()); topic_ = Topic(project_id, pubsub_testing::RandomTopicId(generator_)); - options_ = - Options{}.set(MakeGoogleDefaultCredentials()); + options_ = Options{}; auto const using_emulator = internal::GetEnv("PUBSUB_EMULATOR_HOST").has_value(); if (using_emulator) { @@ -87,8 +86,7 @@ TEST_F(PublisherIntegrationTest, Basic) { TEST_F(PublisherIntegrationTest, TracingEnabled) { options_.set(true); - auto publisher = - Publisher(MakePublisherConnection(topic_, options_)); + auto publisher = Publisher(MakePublisherConnection(topic_, options_)); auto publish = publisher.Publish(MessageBuilder().SetData("test data").Build()).get(); ASSERT_STATUS_OK(publish); @@ -96,8 +94,7 @@ TEST_F(PublisherIntegrationTest, TracingEnabled) { TEST_F(PublisherIntegrationTest, TracingDisabled) { options_.set(true); - auto publisher = - Publisher(MakePublisherConnection(topic_, options_)); + auto publisher = Publisher(MakePublisherConnection(topic_, options_)); auto publish = publisher.Publish(MessageBuilder().SetData("test data").Build()).get(); ASSERT_STATUS_OK(publish); From ebec7563ab14d7a4660a48ced56cf80b988a410e Mon Sep 17 00:00:00 2001 From: Anna Levenberg Date: Fri, 8 Dec 2023 14:42:55 -0500 Subject: [PATCH 10/10] whoops s/true/false --- .../pubsub/integration_tests/publisher_integration_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc index 8b5e03c2807ae..37729dfce5b53 100644 --- a/google/cloud/pubsub/integration_tests/publisher_integration_test.cc +++ b/google/cloud/pubsub/integration_tests/publisher_integration_test.cc @@ -93,7 +93,7 @@ TEST_F(PublisherIntegrationTest, TracingEnabled) { } TEST_F(PublisherIntegrationTest, TracingDisabled) { - options_.set(true); + options_.set(false); auto publisher = Publisher(MakePublisherConnection(topic_, options_)); auto publish = publisher.Publish(MessageBuilder().SetData("test data").Build()).get();