summaryrefslogtreecommitdiff
path: root/src/mongo/db/transaction_api_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/transaction_api_test.cpp')
-rw-r--r--src/mongo/db/transaction_api_test.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mongo/db/transaction_api_test.cpp b/src/mongo/db/transaction_api_test.cpp
index bcfb8ba5815..90a8daf4366 100644
--- a/src/mongo/db/transaction_api_test.cpp
+++ b/src/mongo/db/transaction_api_test.cpp
@@ -1203,6 +1203,7 @@ TEST_F(TxnAPITest, UnyieldsAfterCancellation) {
auto killerThread = stdx::thread([&txnApiStarted, &opCtxKilled, opCtx = opCtx()] {
txnApiStarted.countDownAndWait();
opCtx->markKilled();
+ opCtxKilled.countDownAndWait();
});
auto swResult = txnWithRetries().runNoThrow(
@@ -1230,11 +1231,7 @@ TEST_F(TxnAPITest, UnyieldsAfterCancellation) {
ASSERT_EQ(resourceYielder()->timesYielded(), 1);
ASSERT_EQ(resourceYielder()->timesUnyielded(), 1);
- opCtxKilled.countDownAndWait();
killerThread.join();
-
- // Wait until the API callback has completed before letting the barriers go out of scope.
- waitForAllEarlierTasksToComplete();
}
TEST_F(TxnAPITest, ClientSession_UsesNonRetryableInternalSession) {