The PersistCommitDecisionWhenNoDocumentForTransactionExistsCanBeInterruptedAndReturnsError test case fails due to decision being persistent before txn::AsyncWorkScheduler is shut down.
diff --git a/src/mongo/db/s/transaction_coordinator_test.cpp b/src/mongo/db/s/transaction_coordinator_test.cpp
|
index e7426e97de..d962ffb622 100644
|
--- a/src/mongo/db/s/transaction_coordinator_test.cpp
|
+++ b/src/mongo/db/s/transaction_coordinator_test.cpp
|
@@ -724,6 +724,7 @@ TEST_F(TransactionCoordinatorDriverPersistenceTest,
|
decision.setCommitTimestamp(_commitTimestamp);
|
return decision;
|
}());
|
+ sleepmillis(500);
|
_aws->shutdown({ErrorCodes::TransactionCoordinatorSteppingDown, "Shutdown for test"});
|
|
ASSERT_THROWS_CODE(
|
{"t":{"$date":"2020-10-15T19:28:25.165Z"},"s":"I", "c":"TEST", "id":4680100, "ctx":"main","msg":"FAIL","attr":{"test":"PersistCommitDecisionWhenNoDocumentForTransactionExistsCanBeInterruptedAndReturnsError","type":"TestAssertionFailureException","error":"Expected expression future.get() to throw AssertionException but it threw nothing. @src/mongo/db/s/transaction_coordinator_test.cpp:731"
|