diff options
author | Jacob Evans <jacob.evans@10gen.com> | 2019-05-17 16:42:43 -0400 |
---|---|---|
committer | Jacob Evans <jacob.evans@10gen.com> | 2019-05-21 10:55:01 -0400 |
commit | ea0e6b047c98fd56118431d036ee686be0720226 (patch) | |
tree | 6ccd1c8b8b8631b63cc3f4c4453fa397958d8fa6 /jstests/replsets/linearizable_read_concern.js | |
parent | f09fa890550e6da02656fbb2df33837bf2bdad50 (diff) | |
download | mongo-ea0e6b047c98fd56118431d036ee686be0720226.tar.gz |
SERVER-41200 Change syntax from $out to $merge for tests in other directories
Diffstat (limited to 'jstests/replsets/linearizable_read_concern.js')
-rw-r--r-- | jstests/replsets/linearizable_read_concern.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/jstests/replsets/linearizable_read_concern.js b/jstests/replsets/linearizable_read_concern.js index 78867709a8f..b211ebe5f3b 100644 --- a/jstests/replsets/linearizable_read_concern.js +++ b/jstests/replsets/linearizable_read_concern.js @@ -78,10 +78,16 @@ load('jstests/libs/write_concern_util.js'); assert.eq(opTimeCmd.code, ErrorCodes.FailedToParse); // A $out aggregation is not allowed with readConcern level "linearizable". - let result = assert.throws( - () => primary.getDB("test").foo.aggregate([{$out: {to: "out", mode: "replaceDocuments"}}], - {readConcern: {level: "linearizable"}})); - assert.eq(result.code, ErrorCodes.InvalidOptions); + let outResult = assert.throws(() => primary.getDB("test").foo.aggregate( + [{$out: "out"}], {readConcern: {level: "linearizable"}})); + assert.eq(outResult.code, ErrorCodes.InvalidOptions); + + // A $merge aggregation is not allowed with readConcern level "linearizable". + let mergeResult = assert.throws( + () => primary.getDB("test").foo.aggregate( + [{$merge: {into: "out", whenMatched: "replaceWithNew", whenNotMatched: "insert"}}], + {readConcern: {level: "linearizable"}})); + assert.eq(mergeResult.code, ErrorCodes.InvalidOptions); primary = replTest.getPrimary(); |