diff options
Diffstat (limited to 'jstests/replsets/read_concern_uninitated_set.js')
-rw-r--r-- | jstests/replsets/read_concern_uninitated_set.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/jstests/replsets/read_concern_uninitated_set.js b/jstests/replsets/read_concern_uninitated_set.js index 71f9b2c6956..209c7c5b826 100644 --- a/jstests/replsets/read_concern_uninitated_set.js +++ b/jstests/replsets/read_concern_uninitated_set.js @@ -36,16 +36,18 @@ assert.commandFailedWithCode( {find: "test", filter: {}, maxTimeMS: 60000, readConcern: {level: "majority"}}), ErrorCodes.NotYetInitialized); -jsTestLog("afterClusterTime readConcern should fail with NotYetInitialized."); +// Nodes don't process $clusterTime metadata when in an unreadable state, so this read will fail +// because the logical clock's latest value is less than the given afterClusterTime timestamp. +jsTestLog("afterClusterTime readConcern should fail with InvalidOptions."); assert.commandFailedWithCode(localDB.runCommand({ find: "test", filter: {}, maxTimeMS: 60000, readConcern: {afterClusterTime: Timestamp(1, 1)} }), - ErrorCodes.NotYetInitialized); + ErrorCodes.InvalidOptions); -jsTestLog("oplog query should fail with NotYetInitialized."); +jsTestLog("oplog query should fail with InvalidOptions."); assert.commandFailedWithCode(localDB.runCommand({ find: "oplog.rs", filter: {ts: {$gte: Timestamp(1520004466, 2)}}, @@ -57,6 +59,6 @@ assert.commandFailedWithCode(localDB.runCommand({ term: 1, readConcern: {afterClusterTime: Timestamp(1, 1)} }), - ErrorCodes.NotYetInitialized); + ErrorCodes.InvalidOptions); rst.stopSet(); }()); |