summaryrefslogtreecommitdiff
path: root/jstests/replsets/replsetprio1.js
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-12-10 10:21:51 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-12-11 13:21:22 -0500
commit20cd3a392e15c7b124f634c4c38a4d480f92d1ef (patch)
tree90630643e75a25c9fc5b2bae3b73d565d31352f5 /jstests/replsets/replsetprio1.js
parentefbc57c7da94796766ba45d6ff3cf1da576ef99d (diff)
downloadmongo-20cd3a392e15c7b124f634c4c38a4d480f92d1ef.tar.gz
SERVER-21050 Introduce ReplSetTest.State enumeration everywhere
Makes all JS tests access the replica set member state from the class itself instead of the object instance. Also removes some unused code.
Diffstat (limited to 'jstests/replsets/replsetprio1.js')
-rw-r--r--jstests/replsets/replsetprio1.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/replsets/replsetprio1.js b/jstests/replsets/replsetprio1.js
index c0d6cb48a01..37da3c6474d 100644
--- a/jstests/replsets/replsetprio1.js
+++ b/jstests/replsets/replsetprio1.js
@@ -13,13 +13,13 @@
{"_id" : 2, "host" : nodenames[2], "priority" : 3}]});
// 2 should be master (give this a while to happen, as 0 will be elected, then demoted)
- replTest.waitForState(nodes[2], replTest.PRIMARY, 120000);
+ replTest.waitForState(nodes[2], ReplSetTest.State.PRIMARY, 120000);
// kill 2, 1 should take over
replTest.stop(2);
// 1 should eventually be master
- replTest.waitForState(nodes[1], replTest.PRIMARY, 60000);
+ replTest.waitForState(nodes[1], ReplSetTest.State.PRIMARY, 60000);
// do some writes on 1
var master = replTest.getPrimary();
@@ -33,7 +33,7 @@
// bring 2 back up, 2 should wait until caught up and then become master
replTest.restart(2);
- replTest.waitForState(nodes[2], replTest.PRIMARY, 60000);
+ replTest.waitForState(nodes[2], ReplSetTest.State.PRIMARY, 60000);
// make sure nothing was rolled back
master = replTest.getPrimary();