From 4abd12a3c899f9c06bf0ca26877ca536635b1ebf Mon Sep 17 00:00:00 2001 From: Andy Schwerin Date: Wed, 29 Oct 2014 16:20:21 -0400 Subject: [PATCH] SERVER-15862 Fix isself_different_port.js by reconfiguring smarter. --- jstests/replsets/isself_different_port.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/jstests/replsets/isself_different_port.js b/jstests/replsets/isself_different_port.js index 1d2a26338df..2bbf0bb1a65 100644 --- a/jstests/replsets/isself_different_port.js +++ b/jstests/replsets/isself_different_port.js @@ -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();