diff options
Diffstat (limited to 'jstests/replsets/reconfig.js')
-rw-r--r-- | jstests/replsets/reconfig.js | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/jstests/replsets/reconfig.js b/jstests/replsets/reconfig.js index 55ee505..7d43720 100644 --- a/jstests/replsets/reconfig.js +++ b/jstests/replsets/reconfig.js @@ -60,10 +60,18 @@ replTest.stopSet(); replTest2 = new ReplSetTest({name : 'testSet2', nodes : 1}); nodes = replTest2.startSet(); -result = nodes[0].getDB("admin").runCommand({replSetInitiate : {_id : "testSet2", members : [ - {_id : 0, tags : ["member0"]} - ]}}); - -assert(result.errmsg.match(/bad or missing host field/) , "error message doesn't match, got result:" + tojson(result) ); +assert.soon(function() { + try { + result = nodes[0].getDB("admin").runCommand({replSetInitiate : {_id : "testSet2", members : [ + {_id : 0, tags : ["member0"]} + ]}}); + printjson(result); + return result.errmsg.match(/bad or missing host field/); + } + catch (e) { + print(e); + } + return false; +}); replTest2.stopSet(); |