summaryrefslogtreecommitdiff
path: root/jstests/concurrency/fsm_workload_helpers
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2019-03-07 17:29:24 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2019-03-13 12:15:11 -0400
commitac2e9336b62fc726b29aa624b8ac05bc045523e5 (patch)
tree9980721c51ba0baa24c57121ad292d8d4eae886a /jstests/concurrency/fsm_workload_helpers
parent422e304a2b3514c1b3f8f3dd452fcd5fc598b51f (diff)
downloadmongo-ac2e9336b62fc726b29aa624b8ac05bc045523e5.tar.gz
SERVER-38297 Reenable FSM transactions tests with killOp
Diffstat (limited to 'jstests/concurrency/fsm_workload_helpers')
-rw-r--r--jstests/concurrency/fsm_workload_helpers/cleanup_txns.js7
-rw-r--r--jstests/concurrency/fsm_workload_helpers/snapshot_read_utils.js1
2 files changed, 4 insertions, 4 deletions
diff --git a/jstests/concurrency/fsm_workload_helpers/cleanup_txns.js b/jstests/concurrency/fsm_workload_helpers/cleanup_txns.js
index df44058f36b..c3e135c98d5 100644
--- a/jstests/concurrency/fsm_workload_helpers/cleanup_txns.js
+++ b/jstests/concurrency/fsm_workload_helpers/cleanup_txns.js
@@ -11,13 +11,14 @@ function abortTransaction(sessionAwareDB, txnNumber, errorCodes) {
// Don't use the given session as it might be in a state we don't want to be and
// because we are trying to abort with arbitrary txnNumber.
let rawDB = sessionAwareDB.getSession().getClient().getDB(sessionAwareDB.getName());
- const res = rawDB.adminCommand({
+
+ const abortCmd = {
abortTransaction: 1,
lsid: sessionAwareDB.getSession().getSessionId(),
txnNumber: NumberLong(txnNumber),
autocommit: false
- });
-
+ };
+ const res = rawDB.adminCommand(abortCmd);
return assert.commandWorkedOrFailedWithCode(res, errorCodes, () => `cmd: ${tojson(abortCmd)}`);
}
diff --git a/jstests/concurrency/fsm_workload_helpers/snapshot_read_utils.js b/jstests/concurrency/fsm_workload_helpers/snapshot_read_utils.js
index a020855727b..8662e4f945e 100644
--- a/jstests/concurrency/fsm_workload_helpers/snapshot_read_utils.js
+++ b/jstests/concurrency/fsm_workload_helpers/snapshot_read_utils.js
@@ -83,7 +83,6 @@ function doSnapshotGetMore(collName, data, getMoreErrorCodes, commitTransactionE
const commitCmd = {
commitTransaction: 1,
txnNumber: NumberLong(data.txnNumber),
- stmtId: NumberInt(data.stmtId++),
autocommit: false
};
res = data.sessionDb.adminCommand(commitCmd);