diff options
-rw-r--r-- | src/mongo/db/s/transaction_coordinator_service_test.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/mongo/db/s/transaction_coordinator_service_test.cpp b/src/mongo/db/s/transaction_coordinator_service_test.cpp index eb750325ca7..c99cc39ec25 100644 --- a/src/mongo/db/s/transaction_coordinator_service_test.cpp +++ b/src/mongo/db/s/transaction_coordinator_service_test.cpp @@ -454,10 +454,9 @@ TEST_F(TransactionCoordinatorServiceTest, operationContext(), _lsid, _txnNumberAndRetryCounter, kCommitDeadline); // Progress the transaction up until the point where one participant voted to abort and the - // coordinator has sent abort and is waiting for abort acks. + // coordinator has sent abort and is waiting for an abort ack. auto oldTxnCommitDecisionFuture = *coordinatorService->coordinateCommit( - operationContext(), _lsid, _txnNumberAndRetryCounter, kTwoShardIdSet); - assertPrepareSentAndRespondWithSuccess(); + operationContext(), _lsid, _txnNumberAndRetryCounter, kOneShardIdSet); assertPrepareSentAndRespondWithNoSuchTransaction(); // Create a coordinator with a higher transaction retry counter. @@ -467,18 +466,14 @@ TEST_F(TransactionCoordinatorServiceTest, coordinatorService->createCoordinator( operationContext(), _lsid, newTxnNumberAndRetryCounter, kCommitDeadline); - auto newTxnCommitDecisionFuture = *coordinatorService->coordinateCommit( - operationContext(), _lsid, newTxnNumberAndRetryCounter, kTwoShardIdSet); - - // Finish aborting the original commit by sending it abort acks from both participants. - assertAbortSentAndRespondWithSuccess(); + // Finish aborting the original commit by sending an abort ack. assertAbortSentAndRespondWithSuccess(); - // Simulate all participants acking prepare/voting to commit. - assertPrepareSentAndRespondWithSuccess(); - assertPrepareSentAndRespondWithSuccess(); + auto newTxnCommitDecisionFuture = *coordinatorService->coordinateCommit( + operationContext(), _lsid, newTxnNumberAndRetryCounter, kOneShardIdSet); - assertCommitSentAndRespondWithSuccess(); + // Simulate acking prepare/voting to commit. + assertPrepareSentAndRespondWithSuccess(); assertCommitSentAndRespondWithSuccess(); ASSERT_THROWS_CODE( |