summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2016-04-11 15:17:51 -0400
committerEric Milkie <milkie@10gen.com>2016-06-09 09:32:06 -0400
commitd611372489dc351e030f98bb5bf30f514152b5ac (patch)
tree8109a011e8a8c33a38bec237b6725a9708e48779
parent53ffe36bb87da7a1e5c9b17f09209213e072c1f3 (diff)
downloadmongo-d611372489dc351e030f98bb5bf30f514152b5ac.tar.gz
SERVER-23643 gate state transitions in replsetprio1.js
(cherry picked from commit e96179ba85ae580b3b75bc17e863aba6363319d3)
-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 8b0c6b1cf64..16beb851b81 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);
// Wait for election oplog entry to be replicated, to ensure 0 will vote for 1 after stopping 2.
replTest.awaitReplication();