diff options
Diffstat (limited to 'src/mongo/db/client_strand_test.cpp')
| -rw-r--r-- | src/mongo/db/client_strand_test.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/client_strand_test.cpp b/src/mongo/db/client_strand_test.cpp index cce87321862..661b03ea8cd 100644 --- a/src/mongo/db/client_strand_test.cpp +++ b/src/mongo/db/client_strand_test.cpp @@ -54,7 +54,7 @@ public: * Clean up any leftover thread_local pieces. */ void releaseClient() { - ThreadName::release(ThreadContext::get()); + releaseThreadNameRef(); if (haveClient()) { Client::releaseCurrent(); } @@ -123,7 +123,7 @@ TEST_F(ClientStrandTest, BindMultipleTimes) { // We have no bound Client. assertStrandNotBound(strand); - for (auto i = 0; i < 100; ++i) { + for (auto i = 0; i < 10; ++i) { // Bind a bunch of times. { @@ -145,7 +145,7 @@ TEST_F(ClientStrandTest, BindMultipleTimesAndDismiss) { assertStrandNotBound(strand); auto guard = strand->bind(); - for (auto i = 0; i < 100; ++i) { + for (auto i = 0; i < 10; ++i) { assertStrandBound(strand); // Dismiss the current guard. @@ -266,7 +266,7 @@ TEST_F(ClientStrandTest, BindLocalAfterWorkerThread) { TEST_F(ClientStrandTest, BindManyWorkerThreads) { auto strand = ClientStrand::make(getServiceContext()->makeClient(kClientName1)); - constexpr size_t kCount = 100; + constexpr size_t kCount = 10; auto barrier = std::make_shared<unittest::Barrier>(kCount); size_t threadsBound = 0; @@ -308,7 +308,7 @@ TEST_F(ClientStrandTest, SwapStrands) { assertStrandNotBound(strand1); assertStrandNotBound(strand2); - for (size_t i = 0; i < 100; ++i) { + for (size_t i = 0; i < 10; ++i) { // Alternate between binding strand1 and strand2. Start on strand2 so it has a different // thread name than the previous test. auto& strand = (i % 2 == 0) ? strand2 : strand1; @@ -325,7 +325,7 @@ TEST_F(ClientStrandTest, SwapStrands) { } TEST_F(ClientStrandTest, Executor) { - constexpr size_t kCount = 100; + constexpr size_t kCount = 10; auto strand = ClientStrand::make(getServiceContext()->makeClient(kClientName1)); |
