[fixit] Scale down large tests (#30675)

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/30696/head
Craig Tiller 2 years ago committed by GitHub
parent aef59d7b1f
commit 3db2a71dbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      test/core/promise/activity_test.cc

@ -359,7 +359,7 @@ TEST(AtomicWakerTest, ThreadStress) {
std::atomic<int> not_armed{0}; std::atomic<int> not_armed{0};
AtomicWaker waker; AtomicWaker waker;
threads.reserve(90); threads.reserve(15);
for (int i = 0; i < 5; i++) { for (int i = 0; i < 5; i++) {
threads.emplace_back([&] { threads.emplace_back([&] {
while (!done.load(std::memory_order_relaxed)) { while (!done.load(std::memory_order_relaxed)) {

Loading…
Cancel
Save