summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2017-09-05 16:23:28 -0400
committerBenety Goh <benety@mongodb.com>2017-09-05 16:23:28 -0400
commit5b0bf41d2305f684386332ee96d6a96a77f70e7f (patch)
tree30617f890e78c62862b472274a7789837ebb07a8 /jstests/noPassthrough
parentdbaf6d6c8e5094c78e9e633dc008c28bf2449293 (diff)
downloadmongo-5b0bf41d2305f684386332ee96d6a96a77f70e7f.tar.gz
Revert "SERVER-30371 renaming collection across databases logs individual oplog entries"
This reverts commit 42bfda31eae322ac190e0c8cd831ca73f6e78f18.
Diffstat (limited to 'jstests/noPassthrough')
-rw-r--r--jstests/noPassthrough/atomic_rename_collection.js22
1 files changed, 5 insertions, 17 deletions
diff --git a/jstests/noPassthrough/atomic_rename_collection.js b/jstests/noPassthrough/atomic_rename_collection.js
index d63e08ff6ce..8a1b5526a91 100644
--- a/jstests/noPassthrough/atomic_rename_collection.js
+++ b/jstests/noPassthrough/atomic_rename_collection.js
@@ -12,19 +12,7 @@
let local = prim.getDB("local");
// Test both for rename within a database as across databases.
- const tests = [
- {
- source: first.x,
- target: first.y,
- expectedOplogEntries: 1,
- },
- {
- source: first.x,
- target: second.x,
- expectedOplogEntries: 4,
- }
- ];
- tests.forEach((test) => {
+ [{source: first.x, target: first.y}, {source: first.x, target: second.x}].forEach((test) => {
test.source.drop();
assert.writeOK(test.source.insert({}));
assert.writeOK(test.target.insert({}));
@@ -37,9 +25,9 @@
};
assert.commandWorked(local.adminCommand(cmd), tojson(cmd));
ops = local.oplog.rs.find({ts: {$gt: ts}}).sort({$natural: 1}).toArray();
- assert.eq(ops.length,
- test.expectedOplogEntries,
- "renameCollection was supposed to only generate " + test.expectedOplogEntries +
- " oplog entries: " + tojson(ops));
+ assert.eq(
+ ops.length,
+ 1,
+ "renameCollection was supposed to only generate a single oplog entry: " + tojson(ops));
});
})();