Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:mongodb/mongo

  • Loading branch information...
commit 8a6850bfbedede595e9431790e0529e4e6b00fcd 2 parents 9b12951 + bae82cf
@erh erh authored
Showing with 36 additions and 0 deletions.
  1. +36 −0 jstests/replsets/twosets.js
View
36 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);
Please sign in to comment.
Something went wrong with that request. Please try again.