summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/out_merge_majority_read.js
diff options
context:
space:
mode:
authorRomans Kasperovics <romans.kasperovics@mongodb.com>2022-12-20 11:26:52 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-12-20 11:59:17 +0000
commit5324ef1fab3f06ad008050ac12fadb12b8de877c (patch)
tree8d275c491bf7f5f378947269dca3d3c53ad0abf8 /jstests/noPassthrough/out_merge_majority_read.js
parentf84b645556a27b078b61260d55c53b664aff8b7f (diff)
downloadmongo-5324ef1fab3f06ad008050ac12fadb12b8de877c.tar.gz
SERVER-70042 Assign expected / actual semantics to assert.docEq() arguments
Diffstat (limited to 'jstests/noPassthrough/out_merge_majority_read.js')
-rw-r--r--jstests/noPassthrough/out_merge_majority_read.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/noPassthrough/out_merge_majority_read.js b/jstests/noPassthrough/out_merge_majority_read.js
index 3c56851e6b6..3b177293b7c 100644
--- a/jstests/noPassthrough/out_merge_majority_read.js
+++ b/jstests/noPassthrough/out_merge_majority_read.js
@@ -74,7 +74,7 @@ function runTests(sourceColl, mongodConnection) {
res = targetColl.find().sort({_id: 1});
// Only a single document is visible ($merge did not see the second insert).
- assert.docEq(res.next(), {_id: 1, state: 'merge'});
+ assert.docEq({_id: 1, state: 'merge'}, res.next());
assert(res.isExhausted());
// The same $merge but with whenMatched set to "replace".
@@ -100,9 +100,9 @@ function runTests(sourceColl, mongodConnection) {
res = targetReplaceDocsColl.find().sort({_id: 1});
// The first document must overwrite the update that the read portion of $merge did not see.
- assert.docEq(res.next(), {_id: 1, state: 'merge'});
+ assert.docEq({_id: 1, state: 'merge'}, res.next());
// The second document is the result of the independent insert that $merge did not see.
- assert.docEq(res.next(), {_id: 2, state: 'before'});
+ assert.docEq({_id: 2, state: 'before'}, res.next());
assert(res.isExhausted());
assert.commandWorked(targetColl.remove({}));
@@ -155,7 +155,7 @@ function runTests(sourceColl, mongodConnection) {
res = targetColl.find().sort({_id: 1});
// Only a single document is visible ($merge did not see the second insert).
- assert.docEq(res.next(), {_id: 2, state: 'merge'});
+ assert.docEq({_id: 2, state: 'merge'}, res.next());
assert(res.isExhausted());
}