summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Rossi <sam.rossi@mongodb.com>2016-09-23 14:23:23 -0400
committerSam Rossi <sam.rossi@mongodb.com>2016-09-26 12:42:10 -0400
commit27b2b2c926ff43f3111adef5a99537260a1b44ef (patch)
tree03047fbfb14d15e8bb8e20c118b95135b1263743
parent613cd2c422fcd9fdac6a21a6d5bd5f333018ff11 (diff)
downloadmongo-27b2b2c926ff43f3111adef5a99537260a1b44ef.tar.gz
SERVER-26295 check for existing parameters when initiating secondary in test
-rw-r--r--jstests/noPassthrough/initial_sync_invalid_views.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/jstests/noPassthrough/initial_sync_invalid_views.js b/jstests/noPassthrough/initial_sync_invalid_views.js
index 956ce25930a..28b2a03a363 100644
--- a/jstests/noPassthrough/initial_sync_invalid_views.js
+++ b/jstests/noPassthrough/initial_sync_invalid_views.js
@@ -13,13 +13,20 @@
replSet.initiate();
let primary = replSet.getPrimary();
+ let primaryParams = primary.adminCommand({getCmdLineOpts: 1}).parsed.setParameter;
+ let secondaryParams = {};
+ if (!primaryParams.use3dot2InitialSync) {
+ secondaryParams.use3dot2InitialSync = false;
+ }
+ if (!primaryParams.initialSyncOplogBuffer) {
+ secondaryParams.initialSyncOplogBuffer = "collection";
+ }
+
let coll = primary.getDB('test').foo;
assert.writeOK(coll.insert({a: 1}));
// Add a secondary node but make it hang before copying databases.
- let secondary = replSet.add({
- setParameter: {use3dot2InitialSync: false, initialSyncOplogBuffer: "collection"},
- });
+ let secondary = replSet.add({setParameter: secondaryParams});
secondary.setSlaveOk();
assert.commandWorked(secondary.getDB('admin').runCommand(