diff options
| author | Siyuan Zhou <visualzhou@gmail.com> | 2020-02-07 18:48:09 -0500 |
|---|---|---|
| committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-10 21:45:29 +0000 |
| commit | 4433187014909dc7e83849d7f32c082042b1b2bf (patch) | |
| tree | 3a7832083497096c64ffee5c4ec3ea7281bf0103 /jstests | |
| parent | 5f16a710894feeec5e2a21b102c98ee4a0ec3ef8 (diff) | |
| download | mongo-4433187014909dc7e83849d7f32c082042b1b2bf.tar.gz | |
SERVER-35437 Wait for secondary state after stepdown command in multi_rs.js
Diffstat (limited to 'jstests')
| -rw-r--r-- | jstests/multiVersion/libs/multi_rs.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/jstests/multiVersion/libs/multi_rs.js b/jstests/multiVersion/libs/multi_rs.js index 60bc253d877..e9671baefd1 100644 --- a/jstests/multiVersion/libs/multi_rs.js +++ b/jstests/multiVersion/libs/multi_rs.js @@ -117,6 +117,9 @@ ReplSetTest.prototype.stepdown = function(nodeId) { return true; }); + // Wait for the state to be secondary to avoid the race of closing new connections on stepdown + // on 3.2 and 3.4. + this.waitForState(node, ReplSetTest.State.SECONDARY); return this.reconnect(node); }; |
