diff options
author | Eric Milkie <milkie@mongodb.com> | 2019-11-04 18:49:17 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-11-04 18:49:17 +0000 |
commit | ed610057b4a87cf96e3ba12bea8ae258a569906e (patch) | |
tree | 9239a8d332048a609bbe58e1f9565cd29835e5db /src/mongo/db/repl | |
parent | 927eb1ea8c8b972ec4930d669a9d0804683b10e5 (diff) | |
download | mongo-ed610057b4a87cf96e3ba12bea8ae258a569906e.tar.gz |
SERVER-44368 protect opCtx's Locker with Client lock
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl_test.cpp b/src/mongo/db/repl/replication_coordinator_impl_test.cpp index f4bb250ce1d..0091850e6ef 100644 --- a/src/mongo/db/repl/replication_coordinator_impl_test.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl_test.cpp @@ -1924,7 +1924,7 @@ TEST_F(StepDownTest, // locker to test this, or otherwise stepDown will be granted the lock automatically. ReplicationStateTransitionLockGuard transitionGuard(opCtx.get(), MODE_X); ASSERT_TRUE(opCtx->lockState()->isRSTLExclusive()); - auto locker = opCtx.get()->swapLockState(std::make_unique<LockerImpl>()); + auto locker = getClient()->swapLockState(std::make_unique<LockerImpl>()); ASSERT_THROWS_CODE( getReplCoord()->stepDown(opCtx.get(), false, Milliseconds(0), Milliseconds(1000)), @@ -1935,7 +1935,7 @@ TEST_F(StepDownTest, ASSERT_TRUE(locker->isRSTLExclusive()); ASSERT_FALSE(opCtx->lockState()->isRSTLLocked()); - opCtx.get()->swapLockState(std::move(locker)); + getClient()->swapLockState(std::move(locker)); } /* Step Down Test for a 5-node replica set */ |