summaryrefslogtreecommitdiff
path: root/jstests/replsets/maxSyncSourceLagSecs.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/replsets/maxSyncSourceLagSecs.js')
-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();