diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2020-02-28 17:45:21 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-03-03 09:08:42 +0000 |
commit | 07302cd28d7dce013f9df1ba2f5fcf70e506bce5 (patch) | |
tree | afd1e2b0aae7a3e2d390324f4cd0018847c93b3f /jstests/replsets/reconfig_during_election.js | |
parent | ac9b65c8c5c828e7da56562823fe25158a387aa2 (diff) | |
download | mongo-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.js | 10 |
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(); |