From f133d81714dee9c03f045b0e673db0b138ed04ab Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 22 Aug 2022 16:34:33 -0700 Subject: [PATCH] [fixit] Scale down large tests (#30676) 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. --- ...destroy_grpclb_channel_with_active_connect_stress_test.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc b/test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc index f6aeeaab5fe..6b1d9b7c191 100644 --- a/test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc +++ b/test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc @@ -103,10 +103,7 @@ TEST(DestroyGrpclbChannelWithActiveConnectStressTest, LoopTryConnectAndDestroy) { grpc_init(); std::vector> threads; - // 100 is picked for number of threads just - // because it's enough to reproduce a certain crash almost 100% - // at this time of writing. - const int kNumThreads = 100; + const int kNumThreads = 10; threads.reserve(kNumThreads); for (int i = 0; i < kNumThreads; i++) { threads.emplace_back(new std::thread(TryConnectAndDestroy));