diff options
| author | Eric Milkie <milkie@10gen.com> | 2016-06-27 08:44:45 -0400 |
|---|---|---|
| committer | Eric Milkie <milkie@10gen.com> | 2016-06-27 08:44:45 -0400 |
| commit | 15d3d1f9bd151a2cd21fc7bee0bffc61caaaeb1d (patch) | |
| tree | 459eb2373a65531ac145958a17afb3f6f46a8850 /jstests/replsets/linearizable_read_concern_parsing.js | |
| parent | 52f29d0dc82569e3fb8a008c418f50be2bc61844 (diff) | |
Revert "SERVER-24494 Implemented parsing for linearizable read concern."r3.3.9
This reverts commit cd5b90cfe19732cd576fc7b55e935fd4c74d187b.
Diffstat (limited to 'jstests/replsets/linearizable_read_concern_parsing.js')
| -rw-r--r-- | jstests/replsets/linearizable_read_concern_parsing.js | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/jstests/replsets/linearizable_read_concern_parsing.js b/jstests/replsets/linearizable_read_concern_parsing.js deleted file mode 100644 index f2a7871cf68..00000000000 --- a/jstests/replsets/linearizable_read_concern_parsing.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This tests that commands passed with 'readConcern: linearizable' are parsed correctly. It - * first expects a success on the primary node. Then it expects a failure when a - * linearizable read concern is sent to the secondary node. Finally, it expects a - * failure when the afterOpTime field is also provided. - * - */ -load("jstests/replsets/rslib.js"); -(function() { - - var replTest = new ReplSetTest({ - name: 'linearizable_read_concern_parsing', - nodes: 3, - nodeOptions: {enableMajorityReadConcern: ''} - }); - - if (!startSetIfSupportsReadMajority(replTest)) { - jsTest.log("skipping test since storage engine doesn't support committed reads"); - return true; - } - replTest.initiate(); - - var primary = replTest.getPrimary(); - primary.getDB("test").foo.insert({number: 2}); - - var goodCmd = assert.commandWorked( - primary.getDB("test").runCommand({'find': 'foo', readConcern: {level: "linearizable"}})); - - var secondary = replTest.getSecondary(); - var badCmd = assert.commandFailed(secondary.getDB("test").runCommand({ - 'find': 'foo', - readConcern: {level: "linearizable"}, - })); - - assert.eq(badCmd.errmsg, "cannot satisfy linearizable read concern on non-primary node"); - assert.eq(badCmd.code, ErrorCodes.NotMaster); - - var opTimeCmd = assert.commandFailed(primary.getDB("test").runCommand({ - 'find': 'foo', - readConcern: {level: "linearizable", 'afterOpTime': {ts: Timestamp(1, 2), t: 1}} - })); - assert.eq(opTimeCmd.errmsg, "afterOpTime not compatible with read concern level linearizable"); - assert.eq(opTimeCmd.code, ErrorCodes.FailedToParse); - -}());
\ No newline at end of file |
