Skip to content

Commit

Permalink
SERVER-26880 Use fewer conns in asio connpool test
Browse files Browse the repository at this point in the history
ConnSetupSurvivesFailure spins up too many connections, be less
aggressive so we don't swamp windows machines.
  • Loading branch information
hanumantmk committed Nov 4, 2016
1 parent 0c3bde1 commit a7f147a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mongo/executor/connection_pool_asio_integration_test.cpp
Expand Up @@ -268,20 +268,21 @@ TEST(ConnectionPoolASIO, ConnRefreshSurvivesFailure) {
* timers before they're invoked
*/
TEST(ConnectionPoolASIO, ConnSetupSurvivesFailure) {
const int kNumThreads = 8;
const int kNumOps = 1000;

auto fixture = unittest::getFixtureConnectionString();

NetworkInterfaceASIO::Options options;
options.streamFactory = stdx::make_unique<AsyncStreamFactory>();
options.timerFactory = stdx::make_unique<AsyncTimerFactoryASIO>();
options.connectionPoolOptions.refreshTimeout = Seconds(1);
options.connectionPoolOptions.maxConnections = kNumThreads;
NetworkInterfaceASIO net{std::move(options)};

net.startup();
auto guard = MakeGuard([&] { net.shutdown(); });

const int kNumThreads = 8;
const int kNumOps = 1000;

AtomicWord<size_t> unfinished(kNumThreads * kNumOps);
AtomicWord<size_t> unstarted(kNumThreads * kNumOps);

Expand Down

0 comments on commit a7f147a

Please sign in to comment.