diff options
author | Lingzhi Deng <lingzhi.deng@mongodb.com> | 2019-06-04 10:17:16 -0400 |
---|---|---|
committer | Lingzhi Deng <lingzhi.deng@mongodb.com> | 2019-06-04 11:23:20 -0400 |
commit | aeb8148c54ed9799e87b833d0fa3ba456e2c6719 (patch) | |
tree | 7f801ad5abb37fad1f38e011d2a26a0b27f272ab /jstests/noPassthrough/readConcern_atClusterTime.js | |
parent | 84f1ba4d3302227fbee8f4b89b2c486dce59dbbc (diff) | |
download | mongo-aeb8148c54ed9799e87b833d0fa3ba456e2c6719.tar.gz |
SERVER-40386: replace commitTransaction() used in jstests with commitTransaction_forTesting()
(cherry picked from commit 603d97f23ff6836be5e325bf233524d977ea9d6d)
Diffstat (limited to 'jstests/noPassthrough/readConcern_atClusterTime.js')
-rw-r--r-- | jstests/noPassthrough/readConcern_atClusterTime.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/noPassthrough/readConcern_atClusterTime.js b/jstests/noPassthrough/readConcern_atClusterTime.js index ec38d6d776a..222d7b31ec8 100644 --- a/jstests/noPassthrough/readConcern_atClusterTime.js +++ b/jstests/noPassthrough/readConcern_atClusterTime.js @@ -43,7 +43,7 @@ function _getClusterTime(rst) { // 'atClusterTime' can be used with readConcern level 'snapshot'. session.startTransaction({readConcern: {level: "snapshot", atClusterTime: clusterTime}}); assert.commandWorked(sessionDb.runCommand({find: collName})); - session.commitTransaction(); + assert.commandWorked(session.commitTransaction_forTesting()); // 'atClusterTime' cannot be greater than the current cluster time. const futureClusterTime = new Timestamp(clusterTime.getTime() + 1000, 1); @@ -130,7 +130,7 @@ function _getClusterTime(rst) { session.startTransaction( {readConcern: {level: "snapshot", atClusterTime: _getClusterTime(rst)}}); assert.commandWorked(sessionDb.runCommand({find: collName})); - session.commitTransaction(); + assert.commandWorked(session.commitTransaction_forTesting()); session.endSession(); rst.stopSet(); @@ -144,7 +144,7 @@ function _getClusterTime(rst) { session.startTransaction( {readConcern: {level: "snapshot", atClusterTime: _getClusterTime(rst)}}); assert.commandWorked(sessionDb.runCommand({find: collName})); - session.commitTransaction(); + assert.commandWorked(session.commitTransaction_forTesting()); session.endSession(); rst.stopSet(); } |