summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Shuvalov <andrew.shuvalov@mongodb.com>2021-08-30 15:08:46 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-08-30 15:53:35 +0000
commit48c2b9d205c744a505ff36b246d8d19c216cd72d (patch)
tree256bb3f677ca6c9762b88ace4bde2e17fc60aad0
parent12c720e1bf16165589371ade4b174147d9541a98 (diff)
downloadmongo-48c2b9d205c744a505ff36b246d8d19c216cd72d.tar.gz
SERVER-59669 fix race in test accessing unprotected variable
-rw-r--r--src/mongo/util/net/ssl_manager_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/util/net/ssl_manager_test.cpp b/src/mongo/util/net/ssl_manager_test.cpp
index 23570f15a4d..1dd6585f7c1 100644
--- a/src/mongo/util/net/ssl_manager_test.cpp
+++ b/src/mongo/util/net/ssl_manager_test.cpp
@@ -695,7 +695,7 @@ TEST(SSLManager, TransientSSLParamsStressTestWithManager) {
Mutex mutex = MONGO_MAKE_LATCH("::test_mutex");
std::deque<std::shared_ptr<SSLManagerInterface>> managers;
std::vector<stdx::thread> threads;
- int iterations = 0;
+ Counter64 iterations;
for (int t = 0; t < kThreads; ++t) {
stdx::thread thread([&]() {
@@ -719,7 +719,7 @@ TEST(SSLManager, TransientSSLParamsStressTestWithManager) {
managers.pop_front();
}
}
- ++iterations;
+ iterations.increment();
}
});
threads.push_back(std::move(thread));