summaryrefslogtreecommitdiff
path: root/jstests/replsets/initial_sync1.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/initial_sync1.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/initial_sync1.js')
-rw-r--r--jstests/replsets/initial_sync1.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/jstests/replsets/initial_sync1.js b/jstests/replsets/initial_sync1.js
index 8b673117fd1..4047180d783 100644
--- a/jstests/replsets/initial_sync1.js
+++ b/jstests/replsets/initial_sync1.js
@@ -82,7 +82,8 @@ wait(function() {
(config3 && config3.version == config.version);
});
-replTest.waitForState(slave2, [replTest.SECONDARY, replTest.RECOVERING], 60 * 1000);
+replTest.waitForState(
+ slave2, [ReplSetTest.State.SECONDARY, ReplSetTest.State.RECOVERING], 60 * 1000);
print("7. Kill the secondary in the middle of syncing");
replTest.stop(slave1);
@@ -90,12 +91,12 @@ replTest.stop(slave1);
print("8. Eventually the new node should become a secondary");
print("if initial sync has started, this will cause it to fail and sleep for 5 minutes");
-replTest.waitForState(slave2, replTest.SECONDARY, 60 * 1000);
+replTest.waitForState(slave2, ReplSetTest.State.SECONDARY, 60 * 1000);
print("9. Bring the secondary back up");
replTest.start(slave1, {}, true);
reconnect(slave1);
-replTest.waitForState(slave1, [replTest.PRIMARY, replTest.SECONDARY], 60 * 1000);
+replTest.waitForState(slave1, [ReplSetTest.State.PRIMARY, ReplSetTest.State.SECONDARY], 60 * 1000);
print("10. Insert some stuff");
master = replTest.getPrimary();