0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-15862 Fix isself_different_port.js by reconfiguring smarter.

This commit is contained in:
Andy Schwerin 2014-10-29 16:20:21 -04:00
parent e192dc1257
commit 4abd12a3c8

View File

@ -1,5 +1,7 @@
// Test that the replica set member can find itself if on a different port using
// mongobridge
load("jstests/replsets/rslib.js");
var rt = new ReplSetTest({ name: 'isselfDifferentPortTest', nodes: 1 });
var nodes = rt.startSet({ oplogSize: "2" });
rt.initiate();
@ -12,14 +14,7 @@ var config = rt.getPrimary().getDB("local").system.replset.findOne();
config.members[0].host = br.host;
config.version++;
try {
rt.initiate(config, 'replSetReconfig', 200);
}
catch (ex) {
// If the reconfig causes connections to close, check that the error is due to the reconfig, not
// error. Error message is from JS engine - no error code available unfortunately.
assert(ex.message.match("error doing query"), ex.message);
}
reconfig(rt, config);
jsTestLog("Ensure valid set");
var status = rt.status();