Skip to content

Commit

Permalink
combining two rs's test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristina Chodorow committed Jul 30, 2010
1 parent b561189 commit d008ee9
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions jstests/replsets/twosets.js
@@ -0,0 +1,36 @@
// add a node from a different set to the current set
// I don't know what should happen here.

doTest = function( signal ) {

var orig = new ReplSetTest( {name: 'testSet', nodes: 3} );
orig.startSet();

var interloper = new ReplSetTest( {name: 'testSet', nodes: 3, startPort : 31003} );
interloper.startSet();

sleep(5000);

orig.initiate();
interloper.initiate();

sleep(5000);

var master = orig.getMaster();

var conf = master.getDB("local").system.replset.findOne();

var nodes = interloper.nodeList();
var host = nodes[0];
var id = conf.members.length;
conf.members.push({_id : id, host : host});
conf.version++;

var result = master.getDB("admin").runCommand({replSetReconfig : conf});

// now... stuff should blow up?

sleep(10);
}

doTest(15);

0 comments on commit d008ee9

Please sign in to comment.