summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Schultz <william.schultz@mongodb.com>2020-05-11 15:46:31 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-11 23:09:55 +0000
commit6eb64770517b467ac903d39560c95fb470a77ad0 (patch)
tree30cbd9f577876d06ec241fd5e1f6accb3f54e395
parenta76569621145a187642c6c60da5576c4fd018fec (diff)
downloadmongo-6eb64770517b467ac903d39560c95fb470a77ad0.tar.gz
SERVER-48103 Initiate reconfig_only_counts_*.js tests with a high election timeout
(cherry picked from commit b9bd6ded04f0136157c50c85c8bdc6bb176cccc9)
-rw-r--r--jstests/replsets/reconfig_only_counts_voters_for_config_commitment.js2
-rw-r--r--jstests/replsets/reconfig_only_counts_voting_nodes_for_oplog_commitment.js10
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 c3ac7938e0e..615c6a6ae25 100644
--- a/jstests/replsets/reconfig_only_counts_voters_for_config_commitment.js
+++ b/jstests/replsets/reconfig_only_counts_voters_for_config_commitment.js
@@ -22,7 +22,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 27ee63476aa..118c1f32b44 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
@@ -21,7 +21,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.