diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2023-02-13 19:12:12 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-02-14 17:15:34 +0000 |
commit | ae13a0375bb741e1056e2091a3d612a882413cc6 (patch) | |
tree | 00d5bbf6e1e6a09775ba895270b4ed87e139de53 | |
parent | a74810475928c34efbbb5beda556f9a902312e2c (diff) | |
download | mongo-ae13a0375bb741e1056e2091a3d612a882413cc6.tar.gz |
SERVER-73949 Join created executor in transaction API unit tests
(cherry picked from commit 393506ef23ee030b58c6b3486d64dafc55b84255)
-rw-r--r-- | src/mongo/db/transaction/transaction_api_test.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/transaction/transaction_api_test.cpp b/src/mongo/db/transaction/transaction_api_test.cpp index 453045dbafa..b45831150ad 100644 --- a/src/mongo/db/transaction/transaction_api_test.cpp +++ b/src/mongo/db/transaction/transaction_api_test.cpp @@ -2328,6 +2328,10 @@ TEST_F(TxnAPITest, WaitsForBestEffortAbortOnNonTransientErrorIfNotCancelled) { // After the abort finishes, the API should not have retried. expectSentAbort(1 /* txnNumber */, WriteConcernOptions().toBSON()); + + // Wait for tasks so destructors run on the main test thread. + executor->shutdown(); + executor->join(); } TEST_F(TxnAPITest, WaitsForBestEffortAbortOnTransientError) { @@ -2395,6 +2399,10 @@ TEST_F(TxnAPITest, WaitsForBestEffortAbortOnTransientError) { boost::none /* readConcern */, WriteConcernOptions().toBSON() /* writeConcern */); ASSERT_EQ(lastRequest.firstElementFieldNameStringData(), "commitTransaction"_sd); + + // Wait for tasks so destructors run on the main test thread. + executor->shutdown(); + executor->join(); } } // namespace |