From c4aa5c40c881ad786ddaa3eb6dc807985a950647 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 27 Dec 2024 14:47:23 -0800 Subject: [PATCH] [xds_client_test] remove now-unnecessary override of timer duration (#38357) This should have been done as part of #37668, but I missed it. Closes #38357 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38357 from markdroth:xds_client_test_remove_timeout_override ec8ac69288a61901cb8e3bfeda859f27978baa12 PiperOrigin-RevId: 710139258 --- test/core/xds/xds_client_test.cc | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/test/core/xds/xds_client_test.cc b/test/core/xds/xds_client_test.cc index f2e82afb87c07..35968ab1ca0a2 100644 --- a/test/core/xds/xds_client_test.cc +++ b/test/core/xds/xds_client_test.cc @@ -759,17 +759,15 @@ class XdsClientTest : public ::testing::Test { // Sets transport_factory_ and initializes xds_client_ with the // specified bootstrap config. - void InitXdsClient( - FakeXdsBootstrap::Builder bootstrap_builder = FakeXdsBootstrap::Builder(), - Duration resource_request_timeout = Duration::Seconds(15)) { + void InitXdsClient(FakeXdsBootstrap::Builder bootstrap_builder = + FakeXdsBootstrap::Builder()) { transport_factory_ = MakeRefCounted( []() { FAIL() << "Multiple concurrent reads"; }, event_engine_); auto metrics_reporter = std::make_unique(event_engine_); metrics_reporter_ = metrics_reporter.get(); xds_client_ = MakeRefCounted( bootstrap_builder.Build(), transport_factory_, event_engine_, - std::move(metrics_reporter), "foo agent", "foo version", - resource_request_timeout * grpc_test_slowdown_factor()); + std::move(metrics_reporter), "foo agent", "foo version"); } // Starts and cancels a watch for a Foo resource. @@ -2420,9 +2418,7 @@ TEST_F(XdsClientTest, StreamClosedByServerWithoutSeeingResponse) { } TEST_F(XdsClientTest, ConnectionFails) { - // Lower resources-does-not-exist timeout, to make sure that we're not - // triggering that here. - InitXdsClient(FakeXdsBootstrap::Builder(), Duration::Seconds(3)); + InitXdsClient(); // Tell transport to let us manually trigger completion of the // send_message ops to XdsClient. transport_factory_->SetAutoCompleteMessagesFromClient(false); @@ -2516,7 +2512,7 @@ TEST_F(XdsClientTest, ConnectionFails) { } TEST_F(XdsClientTest, ResourceDoesNotExistUponTimeout) { - InitXdsClient(FakeXdsBootstrap::Builder(), Duration::Seconds(1)); + InitXdsClient(); // Start a watch for "foo1". auto watcher = StartFooWatch("foo1"); // Watcher should initially not see any resource reported. @@ -2602,8 +2598,7 @@ TEST_F(XdsClientTest, ResourceDoesNotExistUponTimeout) { } TEST_F(XdsClientTest, ResourceDoesNotExistAfterStreamRestart) { - // Lower resources-does-not-exist timeout so test finishes faster. - InitXdsClient(FakeXdsBootstrap::Builder(), Duration::Seconds(3)); + InitXdsClient(); // Metrics should initially be empty. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre()); @@ -2717,9 +2712,7 @@ TEST_F(XdsClientTest, ResourceDoesNotExistAfterStreamRestart) { } TEST_F(XdsClientTest, DoesNotExistTimerNotStartedUntilSendCompletes) { - // Lower resources-does-not-exist timeout, to make sure that we're not - // triggering that here. - InitXdsClient(FakeXdsBootstrap::Builder(), Duration::Seconds(3)); + InitXdsClient(); // Tell transport to let us manually trigger completion of the // send_message ops to XdsClient. transport_factory_->SetAutoCompleteMessagesFromClient(false); @@ -2802,7 +2795,7 @@ TEST_F(XdsClientTest, DoesNotExistTimerNotStartedUntilSendCompletes) { // update containing that resource. TEST_F(XdsClientTest, ResourceDoesNotExistUnsubscribeAndResubscribeWhileSendMessagePending) { - InitXdsClient(FakeXdsBootstrap::Builder(), Duration::Seconds(1)); + InitXdsClient(); // Tell transport to let us manually trigger completion of the // send_message ops to XdsClient. transport_factory_->SetAutoCompleteMessagesFromClient(false); @@ -2951,9 +2944,7 @@ TEST_F(XdsClientTest, } TEST_F(XdsClientTest, DoNotSendDoesNotExistForCachedResource) { - // Lower resources-does-not-exist timeout, to make sure that we're not - // triggering that here. - InitXdsClient(FakeXdsBootstrap::Builder(), Duration::Seconds(3)); + InitXdsClient(); // Start a watch for "foo1". auto watcher = StartFooWatch("foo1"); // Watcher should initially not see any resource reported.