From 981bd654b74fac78b1fd7334821f0f6b7e812ee3 Mon Sep 17 00:00:00 2001 From: Benety Goh Date: Tue, 24 Jan 2017 12:19:33 -0500 Subject: SERVER-27799 fixed maxSyncSourceLagSecs.js so that maxSyncSourceLagSecs is changed on slave 2 only instead of all nodes --- jstests/replsets/maxSyncSourceLagSecs.js | 16 ++++++---------- 1 file 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(); -- cgit v1.2.1