summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/readConcern_atClusterTime.js
diff options
context:
space:
mode:
authorCheahuychou Mao <cheahuychou.mao@mongodb.com>2018-08-23 18:26:18 -0400
committerCheahuychou Mao <cheahuychou.mao@mongodb.com>2018-08-24 13:38:18 -0400
commit62a453c0bf4f4be713c079cec178d5b40e251862 (patch)
tree49cd13f1ad382c044734cbf0522ced4d9e9c9c49 /jstests/noPassthrough/readConcern_atClusterTime.js
parent323ee94e5a7f67e9843778bc369c8b855fd7fafb (diff)
downloadmongo-62a453c0bf4f4be713c079cec178d5b40e251862.tar.gz
SERVER-35643 Allow atClusterTime when enableTestCommands is false
Diffstat (limited to 'jstests/noPassthrough/readConcern_atClusterTime.js')
-rw-r--r--jstests/noPassthrough/readConcern_atClusterTime.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/jstests/noPassthrough/readConcern_atClusterTime.js b/jstests/noPassthrough/readConcern_atClusterTime.js
index a90a71feac9..b2e5b6ac9f8 100644
--- a/jstests/noPassthrough/readConcern_atClusterTime.js
+++ b/jstests/noPassthrough/readConcern_atClusterTime.js
@@ -118,8 +118,7 @@ function _getClusterTime(rst) {
session.endSession();
rst.stopSet();
- // readConcern with 'atClusterTime' should fail when 'enableTestCommands' is set to false.
- // TODO: SERVER-35643 Allow atClusterTime when enableTestCommands is false.
+ // readConcern with 'atClusterTime' should succeed regardless of value of 'enableTestCommands'.
{
jsTest.setOption('enableTestCommands', false);
let rst = new ReplSetTest({nodes: 1});
@@ -130,10 +129,8 @@ function _getClusterTime(rst) {
let sessionDb = session.getDatabase(dbName);
session.startTransaction(
{readConcern: {level: "snapshot", atClusterTime: _getClusterTime(rst)}});
- assert.commandFailedWithCode(sessionDb.runCommand({find: collName}),
- ErrorCodes.InvalidOptions);
- assert.commandFailedWithCode(session.abortTransaction_forTesting(),
- ErrorCodes.NoSuchTransaction);
+ assert.commandWorked(sessionDb.runCommand({find: collName}));
+ session.commitTransaction();
session.endSession();
rst.stopSet();