diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2017-11-03 17:24:35 -0400 |
---|---|---|
committer | Judah Schvimer <judah@mongodb.com> | 2017-11-28 11:02:50 -0500 |
commit | 2e9c0d0ed460fd637d5bdb8186825a48815bda2b (patch) | |
tree | 6469fcac55c38ca5f56c7cfebbfd19babf2b40bb /jstests | |
parent | eb186af8ce90bddb8e2927cdd4503a8f83df34e4 (diff) | |
download | mongo-2e9c0d0ed460fd637d5bdb8186825a48815bda2b.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.
(cherry picked from commit 29769e9514980334d72b77bd5af618b7a69e7e72)
Diffstat (limited to 'jstests')
-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 da976c7f4dc..87d5995ef48 100644 --- a/jstests/multiVersion/libs/multi_rs.js +++ b/jstests/multiVersion/libs/multi_rs.js @@ -25,6 +25,7 @@ ReplSetTest.prototype.upgradeSet = function(options, user, pwd) { var node = nodesToUpgrade[i]; if (node == primary) { node = this.stepdown(node); + this.waitForState(node, ReplSetTest.State.SECONDARY); primary = this.getPrimary(); } |