summaryrefslogtreecommitdiff
path: root/jstests/replsets/replsetprio1.js
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2016-04-11 15:17:51 -0400
committerEric Milkie <milkie@10gen.com>2016-04-11 15:39:32 -0400
commite96179ba85ae580b3b75bc17e863aba6363319d3 (patch)
tree6eeac7924d043822902405d9169dfa5f422a161d /jstests/replsets/replsetprio1.js
parent1b69718e5559f5a09f518f79714908edb0210330 (diff)
downloadmongo-e96179ba85ae580b3b75bc17e863aba6363319d3.tar.gz
SERVER-23643 gate state transitions in replsetprio1.js
Diffstat (limited to 'jstests/replsets/replsetprio1.js')
-rw-r--r--jstests/replsets/replsetprio1.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/jstests/replsets/replsetprio1.js b/jstests/replsets/replsetprio1.js
index a68bba37028..fd47de0570a 100644
--- a/jstests/replsets/replsetprio1.js
+++ b/jstests/replsets/replsetprio1.js
@@ -15,8 +15,11 @@
]
});
- // 2 should be master (give this a while to happen, as 0 will be elected, then demoted)
+ // 2 should be master (give this a while to happen, as other nodes might first be elected)
replTest.waitForState(nodes[2], ReplSetTest.State.PRIMARY, 120000);
+ // wait for 1 to not appear to be master (we are about to make it master and need a clean slate
+ // here)
+ replTest.waitForState(nodes[1], ReplSetTest.State.SECONDARY, 60000);
// kill 2, 1 should take over
replTest.stop(2);