diff options
author | Judah Schvimer <judah@mongodb.com> | 2017-01-17 13:19:01 -0500 |
---|---|---|
committer | Judah Schvimer <judah@mongodb.com> | 2017-01-19 17:24:31 -0500 |
commit | 6f930910b7344b8592904a75026b0b47a7735480 (patch) | |
tree | 4146c85c146da24eb9978d15d74143de12b9df84 /jstests | |
parent | 8a5f459539b651cccefc35ebe209e30af2b1b9f1 (diff) | |
download | mongo-6f930910b7344b8592904a75026b0b47a7735480.tar.gz |
SERVER-27365 ensure node 2 is not primary during reconfig in reconfig_without_increased_queues.js
(cherry picked from commit 686069d0fbde93c1bf8b2fe15fad001e98dcc25d)
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/replsets/reconfig_without_increased_queues.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/jstests/replsets/reconfig_without_increased_queues.js b/jstests/replsets/reconfig_without_increased_queues.js index 8b71817166d..39ef7a7e60c 100644 --- a/jstests/replsets/reconfig_without_increased_queues.js +++ b/jstests/replsets/reconfig_without_increased_queues.js @@ -69,6 +69,16 @@ replTest.awaitSecondaryNodes(); + // We cannot reconfig nodes[2] to have priority 0 if it is currently the primary. After the + // first reconfig, it will be unelectable so this only needs to be done once. + if (replTest.getPrimary() === replTest.nodes[2]) { + jsTestLog("Stepping down node 2 before reconfig"); + assert.throws(function() { + replTest.nodes[2].adminCommand({replSetStepDown: 5, force: true}); + }); + replTest.waitForState(replTest.nodes[2], ReplSetTest.State.SECONDARY); + } + // ** Setup different priorities var c = replTest.getReplSetConfigFromNode(); c.members[0].priority = 99; |