summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jstests/replsets/sync2.js30
1 files changed, 13 insertions, 17 deletions
diff --git a/jstests/replsets/sync2.js b/jstests/replsets/sync2.js
index bcccea88d1a..5969663681a 100644
--- a/jstests/replsets/sync2.js
+++ b/jstests/replsets/sync2.js
@@ -1,22 +1,18 @@
+var replTest = new ReplSetTest({name: 'sync2', nodes: 5});
+var nodes = replTest.nodeList();
+replTest.startSet({oplogSize: "2"});
+replTest.initiate({"_id": "sync2",
+ "members": [
+ {"_id": 0, host: nodes[0], priority: 2},
+ {"_id": 1, host: nodes[1]},
+ {"_id": 2, host: nodes[2]},
+ {"_id": 3, host: nodes[3]},
+ {"_id": 4, host: nodes[4]}]
+ });
-var replTest = new ReplSetTest({ name: 'testSet', nodes: 5 });
-var nodes = replTest.startSet({ oplogSize: "2" });
-replTest.initiate();
-
-jsTestLog("Replica set test initialized, reconfiguring to give one node higher priority");
var master = replTest.getMaster();
-var config = master.getDB("local").system.replset.findOne();
-config.version++;
-config.members[0].priority = 2;
-
-try {
- master.getDB("admin").runCommand({replSetReconfig : config});
-}
-catch(e) {
- print(e);
-}
-
-replTest.awaitSecondaryNodes();
+jsTestLog("Replica set test initialized");
+
// initial sync
master.getDB("foo").bar.insert({x:1});
replTest.awaitReplication();