diff options
Diffstat (limited to 'jstests/sharding/internal_txns/retryable_writes_basic.js')
-rw-r--r-- | jstests/sharding/internal_txns/retryable_writes_basic.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/jstests/sharding/internal_txns/retryable_writes_basic.js b/jstests/sharding/internal_txns/retryable_writes_basic.js index d3ebdadce81..666bf93416a 100644 --- a/jstests/sharding/internal_txns/retryable_writes_basic.js +++ b/jstests/sharding/internal_txns/retryable_writes_basic.js @@ -17,16 +17,22 @@ const transactionTest = new RetryableInternalTransactionTest(); { jsTest.log("Test that non-internal transactions cannot be retried"); - const lsid = {id: UUID()}; - const testOptions = {expectRetryToSucceed: false}; - transactionTest.runInsertUpdateDeleteTests(lsid, testOptions); + const makeSessionIdFunc = () => { + return {id: UUID()}; + }; + const expectRetryToSucceed = false; + transactionTest.runInsertUpdateDeleteTests( + {txnOptions: {makeSessionIdFunc}, expectRetryToSucceed}); } { jsTest.log("Test that non-retryable internal transactions cannot be retried"); - const lsid = {id: UUID(), txnUUID: UUID()}; - const testOptions = {expectRetryToSucceed: false}; - transactionTest.runInsertUpdateDeleteTests(lsid, testOptions); + const makeSessionIdFunc = () => { + return {id: UUID(), txnUUID: UUID()}; + }; + const expectRetryToSucceed = false; + transactionTest.runInsertUpdateDeleteTests( + {txnOptions: {makeSessionIdFunc}, expectRetryToSucceed}); } { |