summaryrefslogtreecommitdiff
path: root/jstests/replsets/reconfig_only_counts_voting_nodes_for_oplog_commitment.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/replsets/reconfig_only_counts_voting_nodes_for_oplog_commitment.js')
-rw-r--r--jstests/replsets/reconfig_only_counts_voting_nodes_for_oplog_commitment.js10
1 files changed, 9 insertions, 1 deletions
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.