From a9d4bc4cf9bef8f710283a0d0a228f4003bac2b9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 22 Aug 2022 16:34:52 -0700 Subject: [PATCH] [fixit] Scale down large tests (#30673) We have many tests that create 100 threads or more, and mounting evidence that this is harmful to our CI environment. When the original code for many of these tests was written we ran our tests under run_tests, which had explicit handling for tracking the number of threads each test needed and making sure that we weren't over subscribing the test runner. Bazel has no such facility (and the facility in run_tests has since been removed) and so we need to adjust. This PR adjusts down a single test and is part of a series so that we can review and roll back easily if required. --- .../core/client_channel/resolvers/google_c2p_resolver_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/core/client_channel/resolvers/google_c2p_resolver_test.cc b/test/core/client_channel/resolvers/google_c2p_resolver_test.cc index fd17760ee47..8f717812320 100644 --- a/test/core/client_channel/resolvers/google_c2p_resolver_test.cc +++ b/test/core/client_channel/resolvers/google_c2p_resolver_test.cc @@ -71,7 +71,7 @@ TEST(DestroyGoogleC2pChannelWithActiveConnectStressTest, kWaitForClientToSendFirstBytes, grpc_core::testing::FakeUdpAndTcpServer::CloseSocketUponCloseFromPeer); std::vector> threads; - const int kNumThreads = 100; + const int kNumThreads = 10; threads.reserve(kNumThreads); for (int i = 0; i < kNumThreads; i++) { threads.emplace_back( @@ -90,7 +90,7 @@ TEST(DestroyGoogleC2pChannelWithActiveConnectStressTest, int port = grpc_pick_unused_port_or_die(); std::string address = absl::StrFormat("[::1]:%d", port); std::vector> threads; - const int kNumThreads = 100; + const int kNumThreads = 10; threads.reserve(kNumThreads); for (int i = 0; i < kNumThreads; i++) { threads.emplace_back(