summaryrefslogtreecommitdiff
path: root/jstests/replsets/linearizable_read_concern.js
diff options
context:
space:
mode:
authorJacob Evans <jacob.evans@10gen.com>2019-05-17 16:42:43 -0400
committerJacob Evans <jacob.evans@10gen.com>2019-05-21 10:55:01 -0400
commitea0e6b047c98fd56118431d036ee686be0720226 (patch)
tree6ccd1c8b8b8631b63cc3f4c4453fa397958d8fa6 /jstests/replsets/linearizable_read_concern.js
parentf09fa890550e6da02656fbb2df33837bf2bdad50 (diff)
downloadmongo-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.js14
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();