diff options
author | matt dannenberg <matt.dannenberg@10gen.com> | 2014-05-05 09:33:06 -0400 |
---|---|---|
committer | matt dannenberg <matt.dannenberg@10gen.com> | 2014-05-06 06:25:33 -0400 |
commit | 0779e3a8ed27ee72d3a03290856bc189c919957f (patch) | |
tree | 114a6c57595ae991ae7f876767185fd761b594af /jstests/replsets/sync2.js | |
parent | db2cdad2764375b2411776c3aefaccf4fe2ead76 (diff) | |
download | mongo-0779e3a8ed27ee72d3a03290856bc189c919957f.tar.gz |
SERVER-13839 circumvent reconfig in sync2.js
Diffstat (limited to 'jstests/replsets/sync2.js')
-rw-r--r-- | jstests/replsets/sync2.js | 30 |
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(); |