summaryrefslogtreecommitdiff
path: root/jstests/sharding/oplog_document_key.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/oplog_document_key.js')
-rw-r--r--jstests/sharding/oplog_document_key.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/sharding/oplog_document_key.js b/jstests/sharding/oplog_document_key.js
index 294e3043aef..e09888cbbca 100644
--- a/jstests/sharding/oplog_document_key.js
+++ b/jstests/sharding/oplog_document_key.js
@@ -12,14 +12,14 @@ function validateDocumentKeyInOplogForRemove(ns, _id, docKey) {
const deleteEntry = oplog.findOne({ns: ns, op: 'd', 'o._id': _id});
const o = docKey ? {_id: _id, x: docKey} : {_id: _id};
if (deleteEntry) {
- assert.docEq(deleteEntry.o, o);
+ assert.docEq(o, deleteEntry.o);
} else {
// Validate this is a batched delete, which includes the document key.
const elemMatch = docKey ? {'ns': ns, 'op': 'd', 'o._id': _id, 'o.x': docKey}
: {'ns': ns, 'op': 'd', 'o._id': _id};
const applyOpsEntry =
oplog.findOne({ns: 'admin.$cmd', op: 'c', 'o.applyOps': {$elemMatch: elemMatch}});
- assert.docEq(applyOpsEntry.o.applyOps[0].o, o);
+ assert.docEq(o, applyOpsEntry.o.applyOps[0].o);
}
}