summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2017-01-24 12:19:33 -0500
committerBenety Goh <benety@mongodb.com>2017-01-24 17:11:12 -0500
commit981bd654b74fac78b1fd7334821f0f6b7e812ee3 (patch)
treec2c1f42fc4cc7553a80bafabbd401b4828e55573
parentf6785f6fe57da074f1ff9458d19710ec3ae9b596 (diff)
downloadmongo-981bd654b74fac78b1fd7334821f0f6b7e812ee3.tar.gz
SERVER-27799 fixed maxSyncSourceLagSecs.js so that maxSyncSourceLagSecs is changed on slave 2 only instead of all nodes
-rw-r--r--jstests/replsets/maxSyncSourceLagSecs.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/jstests/replsets/maxSyncSourceLagSecs.js b/jstests/replsets/maxSyncSourceLagSecs.js
index 6bcec4a3f71..f616f1fff16 100644
--- a/jstests/replsets/maxSyncSourceLagSecs.js
+++ b/jstests/replsets/maxSyncSourceLagSecs.js
@@ -7,20 +7,16 @@
var name = "maxSyncSourceLagSecs";
var replTest = new ReplSetTest({
name: name,
- nodes: 3,
+ nodes: [
+ {rsConfig: {priority: 3}},
+ {rsConfig: {priority: 0}},
+ {rsConfig: {priority: 0}, setParameter: 'maxSyncSourceLagSecs=3'},
+ ],
oplogSize: 5,
- nodeOptions: {setParameter: "maxSyncSourceLagSecs=3"}
});
var nodes = replTest.nodeList();
replTest.startSet();
- replTest.initiate({
- "_id": name,
- "members": [
- {"_id": 0, "host": nodes[0], priority: 3},
- {"_id": 1, "host": nodes[1], priority: 0},
- {"_id": 2, "host": nodes[2], priority: 0}
- ],
- });
+ replTest.initiate();
replTest.awaitNodesAgreeOnPrimary();
var master = replTest.getPrimary();