summaryrefslogtreecommitdiff
path: root/jstests/concurrency
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/concurrency')
-rw-r--r--jstests/concurrency/fsm_workload_helpers/auto_retry_transaction.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/jstests/concurrency/fsm_workload_helpers/auto_retry_transaction.js b/jstests/concurrency/fsm_workload_helpers/auto_retry_transaction.js
index 8877363e2a4..b05323d9f39 100644
--- a/jstests/concurrency/fsm_workload_helpers/auto_retry_transaction.js
+++ b/jstests/concurrency/fsm_workload_helpers/auto_retry_transaction.js
@@ -19,6 +19,10 @@ var {withTxnAndAutoRetry} = (function() {
}
}
+ // Use a "signature" value that won't typically match a value assigned in normal use. This way
+ // the wtimeout set by this override is distinguishable in the server logs.
+ const kDefaultWtimeout = 5 * 60 * 1000 + 789;
+
/**
* Runs 'func' inside of a transaction started with 'txnOptions', and automatically retries
* until it either succeeds or the server returns a non-TransientTransactionError error
@@ -32,7 +36,10 @@ var {withTxnAndAutoRetry} = (function() {
*/
function withTxnAndAutoRetry(session, func, {
txnOptions: txnOptions = {
- readConcern: {level: TestData.defaultTransactionReadConcernLevel || 'snapshot'}
+ readConcern: {level: TestData.defaultTransactionReadConcernLevel || 'snapshot'},
+ writeConcern: TestData.hasOwnProperty("defaultTransactionWriteConcernW")
+ ? {w: TestData.defaultTransactionWriteConcernW, wtimeout: kDefaultWtimeout}
+ : undefined
},
retryOnKilledSession: retryOnKilledSession = false,
prepareProbability: prepareProbability = 0.0