diff options
author | Antonin Kral <a.kral@bobek.cz> | 2012-05-10 06:57:54 +0200 |
---|---|---|
committer | Antonin Kral <a.kral@bobek.cz> | 2012-05-10 06:57:54 +0200 |
commit | 61619b3142c1de8f60f91964ff2656054d4f11a6 (patch) | |
tree | d3aaf9d1e70cac8efa0856e5b5ba39e2fb9dc526 /jstests/replsets/replset_remove_node.js | |
parent | eaaa7b30c99b89b5483e0a372bb73fe8c8695185 (diff) | |
download | mongodb-61619b3142c1de8f60f91964ff2656054d4f11a6.tar.gz |
Imported Upstream version 2.0.5
Diffstat (limited to 'jstests/replsets/replset_remove_node.js')
-rw-r--r-- | jstests/replsets/replset_remove_node.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/jstests/replsets/replset_remove_node.js b/jstests/replsets/replset_remove_node.js index 9fef721..bf99b12 100644 --- a/jstests/replsets/replset_remove_node.js +++ b/jstests/replsets/replset_remove_node.js @@ -1,6 +1,6 @@ doTest = function( signal ) { - // Make sure that we can manually shutdown a remove a + // Make sure that we can manually shutdown a remove a // slave from the configuration. // Create a new replica set test. Specify set name and the number of nodes you want. @@ -12,7 +12,14 @@ doTest = function( signal ) { // Call initiate() to send the replSetInitiate command // This will wait for initiation - replTest.initiate(); + var name = replTest.nodeList(); + replTest.initiate({"_id" : "testSet", + "members" : [ + // make sure 0 becomes primary so we don't try to remove the + // primary below + {"_id" : 0, "host" : name[0], priority:2}, + {"_id" : 1, "host" : name[1]}, + {"_id" : 2, "host" : name[2]}]}); // Call getMaster to return a reference to the node that's been // elected master. @@ -41,7 +48,7 @@ doTest = function( signal ) { print(e); } - + // Make sure that a new master comes up master = replTest.getMaster(); slaves = replTest.liveNodes.slaves; |