summaryrefslogtreecommitdiff
path: root/jstests/replsets/reconfig_during_election.js
diff options
context:
space:
mode:
authorSiyuan Zhou <siyuan.zhou@mongodb.com>2020-02-28 17:45:21 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-03-03 09:08:42 +0000
commit07302cd28d7dce013f9df1ba2f5fcf70e506bce5 (patch)
treeafd1e2b0aae7a3e2d390324f4cd0018847c93b3f /jstests/replsets/reconfig_during_election.js
parentac9b65c8c5c828e7da56562823fe25158a387aa2 (diff)
downloadmongo-07302cd28d7dce013f9df1ba2f5fcf70e506bce5.tar.gz
SERVER-45081 Increment config term via reconfig on stepup.
Diffstat (limited to 'jstests/replsets/reconfig_during_election.js')
-rw-r--r--jstests/replsets/reconfig_during_election.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/jstests/replsets/reconfig_during_election.js b/jstests/replsets/reconfig_during_election.js
index c8222a9143a..b0ff620de46 100644
--- a/jstests/replsets/reconfig_during_election.js
+++ b/jstests/replsets/reconfig_during_election.js
@@ -41,10 +41,12 @@ jsTestLog("Try to interrupt it with a reconfig");
config.members[nodes.indexOf(candidate)].priority = 2;
config.version++;
// While the candidate is stepping up, it it possible for the RstlKillOpThread to kill this reconfig
-// command before it succeeds. Failing with an InterruptedDueToReplStateChange error is acceptable
-// here because we are testing that the reconfig command does not cause the server to invariant.
-assert.commandWorkedOrFailedWithCode(candidate.adminCommand({replSetReconfig: config, force: true}),
- ErrorCodes.InterruptedDueToReplStateChange);
+// command before it succeeds. Failing due to interruption on stepup or the automatic reconfig on
+// stepup is acceptable here because we are testing that the reconfig command does not cause the
+// server to invariant.
+assert.commandWorkedOrFailedWithCode(
+ candidate.adminCommand({replSetReconfig: config, force: true}),
+ [ErrorCodes.InterruptedDueToReplStateChange, ErrorCodes.ConfigurationInProgress]);
failPoint.off();