diff options
Diffstat (limited to 'jstests/replsets/election_handoff_basic.js')
-rw-r--r-- | jstests/replsets/election_handoff_basic.js | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/jstests/replsets/election_handoff_basic.js b/jstests/replsets/election_handoff_basic.js index c11a60612a2..2c1e27b6ece 100644 --- a/jstests/replsets/election_handoff_basic.js +++ b/jstests/replsets/election_handoff_basic.js @@ -5,22 +5,24 @@ */ (function() { - "use strict"; - load("jstests/replsets/libs/election_handoff.js"); +"use strict"; +load("jstests/replsets/libs/election_handoff.js"); - const testName = "election_handoff_vanilla"; - const numNodes = 2; - const rst = ReplSetTest({name: testName, nodes: numNodes}); - const nodes = rst.nodeList(); - rst.startSet(); +const testName = "election_handoff_vanilla"; +const numNodes = 2; +const rst = ReplSetTest({name: testName, nodes: numNodes}); +const nodes = rst.nodeList(); +rst.startSet(); - // Make sure there are no election timeouts firing for the duration of the test. This helps - // ensure that the test will only pass if the election handoff succeeds. - const config = rst.getReplSetConfig(); - config.settings = {"electionTimeoutMillis": 12 * 60 * 60 * 1000}; - rst.initiate(config); +// Make sure there are no election timeouts firing for the duration of the test. This helps +// ensure that the test will only pass if the election handoff succeeds. +const config = rst.getReplSetConfig(); +config.settings = { + "electionTimeoutMillis": 12 * 60 * 60 * 1000 +}; +rst.initiate(config); - ElectionHandoffTest.testElectionHandoff(rst, 0, 1); +ElectionHandoffTest.testElectionHandoff(rst, 0, 1); - rst.stopSet(); +rst.stopSet(); })();
\ No newline at end of file |