summaryrefslogtreecommitdiff
path: root/src/mongo/db/transaction_participant_retryable_writes_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/transaction_participant_retryable_writes_test.cpp')
-rw-r--r--src/mongo/db/transaction_participant_retryable_writes_test.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/transaction_participant_retryable_writes_test.cpp b/src/mongo/db/transaction_participant_retryable_writes_test.cpp
index 155935ddd47..27c2587eeb9 100644
--- a/src/mongo/db/transaction_participant_retryable_writes_test.cpp
+++ b/src/mongo/db/transaction_participant_retryable_writes_test.cpp
@@ -699,6 +699,7 @@ TEST_F(ShardTxnParticipantRetryableWritesTest,
const auto& sessionId = *opCtx()->getLogicalSessionId();
const TxnNumber txnNum = 20;
+ opCtx()->setTxnNumber(txnNum);
const auto uuid = UUID::gen();
txnParticipant.beginOrContinue(opCtx(), txnNum, boost::none, boost::none);
@@ -719,6 +720,7 @@ TEST_F(ShardTxnParticipantRetryableWritesTest,
auto autocommit = false;
auto startTransaction = true;
+ opCtx()->setInMultiDocumentTransaction();
ASSERT_THROWS_CODE(
txnParticipant.beginOrContinue(opCtx(), txnNum, autocommit, startTransaction),