diff options
author | Siyuan Zhou <visualzhou@gmail.com> | 2020-02-07 18:48:09 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-02 07:48:26 +0000 |
commit | d3bc3ed51172956dd2c810be014648d89a4c24dd (patch) | |
tree | 6ad85dba7aeef05f9f6d5bef99f4d26ee58d5600 | |
parent | ea2df8b3c23418edbb0c2a0adc1a6c709312f8fe (diff) | |
download | mongo-d3bc3ed51172956dd2c810be014648d89a4c24dd.tar.gz |
SERVER-35437 Wait for secondary state after stepdown command in multi_rs.js
-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 ce67a5ed157..40448e7e424 100644 --- a/jstests/multiVersion/libs/multi_rs.js +++ b/jstests/multiVersion/libs/multi_rs.js @@ -116,6 +116,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); }; |