summaryrefslogtreecommitdiff
path: root/jstests/replsets/test_command.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/test_command.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/test_command.js')
-rw-r--r--jstests/replsets/test_command.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/replsets/test_command.js b/jstests/replsets/test_command.js
index ac46d25fcbd..2e523c95953 100644
--- a/jstests/replsets/test_command.js
+++ b/jstests/replsets/test_command.js
@@ -22,7 +22,7 @@
assert.commandWorked(
replSet.nodes[0].adminCommand({
replSetTest: 1,
- waitForMemberState: replSet.PRIMARY,
+ waitForMemberState: ReplSetTest.State.PRIMARY,
timeoutMillis: 60 * 1000,
}),
'node 0' + replSet.nodes[0].host + ' failed to become primary'
@@ -63,7 +63,7 @@
assert.commandFailedWithCode(
primary.adminCommand({
replSetTest: 1,
- waitForMemberState: replSet.PRIMARY,
+ waitForMemberState: ReplSetTest.State.PRIMARY,
timeoutMillis: "what timeout",
}),
ErrorCodes.TypeMismatch,
@@ -83,7 +83,7 @@
assert.commandFailedWithCode(
primary.adminCommand({
replSetTest: 1,
- waitForMemberState: replSet.PRIMARY,
+ waitForMemberState: ReplSetTest.State.PRIMARY,
timeoutMillis: -1000,
}),
ErrorCodes.BadValue,
@@ -93,7 +93,7 @@
assert.commandFailedWithCode(
primary.adminCommand({
replSetTest: 1,
- waitForMemberState: replSet.SECONDARY,
+ waitForMemberState: ReplSetTest.State.SECONDARY,
timeoutMillis: 1000,
}),
ErrorCodes.ExceededTimeLimit,
@@ -104,7 +104,7 @@
assert.commandWorked(
secondary.adminCommand({
replSetTest: 1,
- waitForMemberState: replSet.SECONDARY,
+ waitForMemberState: ReplSetTest.State.SECONDARY,
timeoutMillis: 1000,
}),
'replSetTest waitForMemberState(SECONDARY) failed on node 1 ' +