diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-12-10 10:21:51 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-12-11 13:21:22 -0500 |
commit | 20cd3a392e15c7b124f634c4c38a4d480f92d1ef (patch) | |
tree | 90630643e75a25c9fc5b2bae3b73d565d31352f5 /jstests/replsets/config_server_checks.js | |
parent | efbc57c7da94796766ba45d6ff3cf1da576ef99d (diff) | |
download | mongo-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/config_server_checks.js')
-rw-r--r-- | jstests/replsets/config_server_checks.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/jstests/replsets/config_server_checks.js b/jstests/replsets/config_server_checks.js index 41579aceb89..2c6128d75e8 100644 --- a/jstests/replsets/config_server_checks.js +++ b/jstests/replsets/config_server_checks.js @@ -33,7 +33,7 @@ try { } catch (e) { // expected since we close all connections after going into REMOVED } -expectState(rst, rst.REMOVED); +expectState(rst, ReplSetTest.State.REMOVED); rst.stopSet(); })(); @@ -52,7 +52,7 @@ conf.configsvr = true; assert.commandWorked(rst.nodes[0].adminCommand({replSetInitiate: conf})); rst.getPrimary(); -expectState(rst, rst.PRIMARY); +expectState(rst, ReplSetTest.State.PRIMARY); rst.stopSet(); })(); @@ -72,7 +72,7 @@ conf.configsvr = true; assert.commandWorked(rst.nodes[0].adminCommand({replSetInitiate: conf})); rst.getPrimary(); -expectState(rst, rst.PRIMARY); +expectState(rst, ReplSetTest.State.PRIMARY); var conf = rst.getPrimary().getDB('local').system.replset.findOne(); assert(conf.configsvr, tojson(conf)); @@ -94,7 +94,7 @@ rst.startSet(); assert.commandWorked(rst.nodes[0].adminCommand({replSetInitiate: 1})); rst.getPrimary(); -expectState(rst, rst.PRIMARY); +expectState(rst, ReplSetTest.State.PRIMARY); rst.stopSet(); })(); @@ -112,7 +112,7 @@ var conf = rst.getReplSetConfig(); assert.commandWorked(rst.nodes[0].adminCommand({replSetInitiate: conf})); rst.getPrimary(); -expectState(rst, rst.PRIMARY); +expectState(rst, ReplSetTest.State.PRIMARY); assert.throws(function() { rst.restart(0, {configsvr: ""}); }); @@ -136,7 +136,7 @@ conf.configsvr = true; assert.commandWorked(rst.nodes[0].adminCommand({replSetInitiate: conf})); rst.getPrimary(); -expectState(rst, rst.PRIMARY); +expectState(rst, ReplSetTest.State.PRIMARY); var node = rst.nodes[0]; var options = node.savedOptions; @@ -150,5 +150,4 @@ assert.eq(null, conn, "Mongod should have failed to start, but didn't"); rst.stopSet(); })(); - })(); |