[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.
pull/30411/head
Craig Tiller 2 years ago committed by GitHub
parent 966b58edb7
commit f133d81714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc

@ -103,10 +103,7 @@ TEST(DestroyGrpclbChannelWithActiveConnectStressTest,
LoopTryConnectAndDestroy) {
grpc_init();
std::vector<std::unique_ptr<std::thread>> 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));

Loading…
Cancel
Save