summaryrefslogtreecommitdiff
path: root/src/mongo/db/client_strand_test.cpp
diff options
context:
space:
mode:
authorLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
committerLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
commit4cb8841196d0625dfa3825aa326f071cd27c7b8b (patch)
tree1682a647d4463397c119183369ae6f750d5fdcff /src/mongo/db/client_strand_test.cpp
parentaa03c6362cbaa767638e6eed9b031d86dd2643d1 (diff)
parent8f0827553e09872941945a093b647a4211a9db7f (diff)
Update upstream source from tag 'upstream/6.0.0'master
Update to upstream version '6.0.0' with Debian dir 5604a80ec1c96ca76f25f40d78e6ef855abec322
Diffstat (limited to 'src/mongo/db/client_strand_test.cpp')
-rw-r--r--src/mongo/db/client_strand_test.cpp12
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 661b03ea8cd..cce87321862 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() {
- releaseThreadNameRef();
+ ThreadName::release(ThreadContext::get());
if (haveClient()) {
Client::releaseCurrent();
}
@@ -123,7 +123,7 @@ TEST_F(ClientStrandTest, BindMultipleTimes) {
// We have no bound Client.
assertStrandNotBound(strand);
- for (auto i = 0; i < 10; ++i) {
+ for (auto i = 0; i < 100; ++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 < 10; ++i) {
+ for (auto i = 0; i < 100; ++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 = 10;
+ constexpr size_t kCount = 100;
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 < 10; ++i) {
+ for (size_t i = 0; i < 100; ++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 = 10;
+ constexpr size_t kCount = 100;
auto strand = ClientStrand::make(getServiceContext()->makeClient(kClientName1));