diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2017-11-03 17:24:35 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2017-11-03 17:25:02 -0400 |
commit | 29769e9514980334d72b77bd5af618b7a69e7e72 (patch) | |
tree | 0838a470d8948fec135463011f4ee05b1dba046a /jstests/multiVersion/libs/multi_rs.js | |
parent | 1f0f4bc4cbd30a88e3abcc026965df967a1002da (diff) | |
download | mongo-29769e9514980334d72b77bd5af618b7a69e7e72.tar.gz |
SERVER-31827 Wait for Secondary after stepdown.
The primary being told to step down will kill all incoming connections
during that stepdown process. When this happens, connections which
are incoming may be closed before they can enter a state which
"reserves" them from closure. To facilitate correct semantics in this
test, we should wait for the primary to completely step down to a
secondary, before trying to authenticate to it again.
Diffstat (limited to 'jstests/multiVersion/libs/multi_rs.js')
-rw-r--r-- | jstests/multiVersion/libs/multi_rs.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/jstests/multiVersion/libs/multi_rs.js b/jstests/multiVersion/libs/multi_rs.js index e9e73c6ec16..40fe9556b99 100644 --- a/jstests/multiVersion/libs/multi_rs.js +++ b/jstests/multiVersion/libs/multi_rs.js @@ -43,6 +43,7 @@ ReplSetTest.prototype.upgradePrimary = function(primary, options, user, pwd) { } let oldPrimary = this.stepdown(primary); + this.waitForState(oldPrimary, ReplSetTest.State.SECONDARY); // stepping down the node can close the connection and lose the authentication state, so // re-authenticate here before calling awaitNodesAgreeOnPrimary(). |