diff options
author | William Schultz <william.schultz@mongodb.com> | 2020-05-11 15:46:31 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-05-11 22:00:43 +0000 |
commit | b9bd6ded04f0136157c50c85c8bdc6bb176cccc9 (patch) | |
tree | 3192206767379f9288c89c5875fac7d3ca2ece38 | |
parent | 8b8488340f53a71f29f40ead546e36c59323ca93 (diff) | |
download | mongo-b9bd6ded04f0136157c50c85c8bdc6bb176cccc9.tar.gz |
SERVER-48103 Initiate reconfig_only_counts_*.js tests with a high election timeout
-rw-r--r-- | jstests/replsets/reconfig_only_counts_voters_for_config_commitment.js | 2 | ||||
-rw-r--r-- | jstests/replsets/reconfig_only_counts_voting_nodes_for_oplog_commitment.js | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/jstests/replsets/reconfig_only_counts_voters_for_config_commitment.js b/jstests/replsets/reconfig_only_counts_voters_for_config_commitment.js index 0e0737fd6c2..6f2a92ce060 100644 --- a/jstests/replsets/reconfig_only_counts_voters_for_config_commitment.js +++ b/jstests/replsets/reconfig_only_counts_voters_for_config_commitment.js @@ -20,7 +20,7 @@ var replTest = new ReplSetTest({ useBridge: true }); var nodes = replTest.startSet(); -replTest.initiate(); +replTest.initiateWithHighElectionTimeout(); var primary = replTest.getPrimary(); var secondary = replTest.getSecondary(); diff --git a/jstests/replsets/reconfig_only_counts_voting_nodes_for_oplog_commitment.js b/jstests/replsets/reconfig_only_counts_voting_nodes_for_oplog_commitment.js index 62b368e0f96..5b028b0ae15 100644 --- a/jstests/replsets/reconfig_only_counts_voting_nodes_for_oplog_commitment.js +++ b/jstests/replsets/reconfig_only_counts_voting_nodes_for_oplog_commitment.js @@ -19,7 +19,15 @@ var replTest = new ReplSetTest({ ] }); var nodes = replTest.startSet(); -replTest.initiate(); + +// Stopping replication on secondaries can be very slow with a high election timeout. Set a small +// oplog getMore timeout so the test runs faster. +nodes.forEach(node => { + assert.commandWorked( + node.adminCommand({configureFailPoint: 'setSmallOplogGetMoreMaxTimeMS', mode: 'alwaysOn'})); +}); + +replTest.initiateWithHighElectionTimeout(); var primary = replTest.getPrimary(); // Do a write that should not be able to replicate to node1 since we stopped replication. |