diff options
author | Sophia Tan <sophia_tll@hotmail.com> | 2023-05-12 19:44:44 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-05-15 23:20:28 +0000 |
commit | 6be86d8987dbad1c33160ef1779b598bc7cfa6b4 (patch) | |
tree | b3484e6c70e402ddf66482df828c3b3f221457b3 /src/mongo/db/concurrency/d_concurrency_test.cpp | |
parent | ba0986ac66e3a22d211ad3707ad037fdc10910af (diff) | |
download | mongo-6be86d8987dbad1c33160ef1779b598bc7cfa6b4.tar.gz |
SERVER-75276 writeConflictRetry should properly be using a NamespaceStringOrUUID instead of a StringData
Diffstat (limited to 'src/mongo/db/concurrency/d_concurrency_test.cpp')
-rw-r--r-- | src/mongo/db/concurrency/d_concurrency_test.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/concurrency/d_concurrency_test.cpp b/src/mongo/db/concurrency/d_concurrency_test.cpp index fd3c6e5de70..db14817b030 100644 --- a/src/mongo/db/concurrency/d_concurrency_test.cpp +++ b/src/mongo/db/concurrency/d_concurrency_test.cpp @@ -183,7 +183,7 @@ public: TEST_F(DConcurrencyTestFixture, WriteConflictRetryInstantiatesOK) { auto opCtx = makeOperationContext(); getClient()->swapLockState(std::make_unique<LockerImpl>(opCtx->getServiceContext())); - writeConflictRetry(opCtx.get(), "", "", [] {}); + writeConflictRetry(opCtx.get(), "", NamespaceString(), [] {}); } TEST_F(DConcurrencyTestFixture, WriteConflictRetryRetriesFunctionOnWriteConflictException) { @@ -191,7 +191,7 @@ TEST_F(DConcurrencyTestFixture, WriteConflictRetryRetriesFunctionOnWriteConflict getClient()->swapLockState(std::make_unique<LockerImpl>(opCtx->getServiceContext())); auto&& opDebug = CurOp::get(opCtx.get())->debug(); ASSERT_EQUALS(0, opDebug.additiveMetrics.writeConflicts.load()); - ASSERT_EQUALS(100, writeConflictRetry(opCtx.get(), "", "", [&opDebug] { + ASSERT_EQUALS(100, writeConflictRetry(opCtx.get(), "", NamespaceString(), [&opDebug] { if (0 == opDebug.additiveMetrics.writeConflicts.load()) { throwWriteConflictException( str::stream() @@ -208,7 +208,7 @@ TEST_F(DConcurrencyTestFixture, WriteConflictRetryPropagatesNonWriteConflictExce getClient()->swapLockState(std::make_unique<LockerImpl>(opCtx->getServiceContext())); ASSERT_THROWS_CODE(writeConflictRetry(opCtx.get(), "", - "", + NamespaceString(), [] { uassert(ErrorCodes::OperationFailed, "", false); MONGO_UNREACHABLE; @@ -226,7 +226,7 @@ TEST_F(DConcurrencyTestFixture, ASSERT_THROWS(writeConflictRetry( opCtx.get(), "", - "", + NamespaceString(), [] { throwWriteConflictException( str::stream() << "Verify that WriteConflictExceptions are propogated " |