summaryrefslogtreecommitdiff
path: root/jstests/replsets/reconfig_waits_for_a_majority_to_replicate_config.js
diff options
context:
space:
mode:
authorPavithra Vetriselvan <pavithra.vetriselvan@mongodb.com>2020-02-27 22:02:01 +0000
committerevergreen <evergreen@mongodb.com>2020-02-27 22:02:01 +0000
commit9286617bbc5f9087f3774fc7d4dd4d366c584ae2 (patch)
tree0c15b9278037e970eb34ad8852f2e0fc89572129 /jstests/replsets/reconfig_waits_for_a_majority_to_replicate_config.js
parentc01de187585576180188d2598e5229a93a0743ed (diff)
downloadmongo-9286617bbc5f9087f3774fc7d4dd4d366c584ae2.tar.gz
SERVER-45085 re-enable config quorum checker
Diffstat (limited to 'jstests/replsets/reconfig_waits_for_a_majority_to_replicate_config.js')
-rw-r--r--jstests/replsets/reconfig_waits_for_a_majority_to_replicate_config.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/jstests/replsets/reconfig_waits_for_a_majority_to_replicate_config.js b/jstests/replsets/reconfig_waits_for_a_majority_to_replicate_config.js
index 6774e4dfaa7..27997337f78 100644
--- a/jstests/replsets/reconfig_waits_for_a_majority_to_replicate_config.js
+++ b/jstests/replsets/reconfig_waits_for_a_majority_to_replicate_config.js
@@ -9,6 +9,7 @@
"use strict";
load("jstests/replsets/rslib.js");
+load("jstests/libs/fail_point_util.js");
var replTest = new ReplSetTest({nodes: 2, useBridge: true});
var nodes = replTest.startSet();
@@ -21,6 +22,10 @@ var secondary = replTest.getSecondary();
// Disconnect the secondary from the primary.
secondary.disconnect(primary);
+// Configure a failpoint so that we bypass the config quorum check and go straight to the
+// config replication check.
+let reconfigFailPoint = configureFailPoint(primary, "omitConfigQuorumCheck");
+
// Run a reconfig with a timeout of 5 seconds, this should fail with a maxTimeMSExpired error.
var config = primary.getDB("local").system.replset.findOne();
config.version++;
@@ -30,7 +35,7 @@ assert.commandFailedWithCode(
// Try to run another reconfig, which should also fail immediately because the previous config is
// not committed.
-config = primary.getDB("local").system.replset.findOne();
+var config = primary.getDB("local").system.replset.findOne();
config.version++;
assert.commandFailedWithCode(
primary.getDB("admin").runCommand({replSetReconfig: config, maxTimeMS: 5000}),
@@ -40,5 +45,7 @@ assert.commandFailedWithCode(
secondary.reconnect(primary);
// TODO SERVER-44812: test commitment status of reconfig.
+reconfigFailPoint.off();
+
replTest.stopSet();
}()); \ No newline at end of file