summaryrefslogtreecommitdiff
path: root/jstests/replsets/reconfig.js
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2012-05-10 06:57:57 +0200
committerAntonin Kral <a.kral@bobek.cz>2012-05-10 06:57:57 +0200
commit8813daaab256108f7aa6300875e8562d031f2c2f (patch)
tree06daade9022f76b2775d23f4613817365a2ded99 /jstests/replsets/reconfig.js
parentd72a59184a3d51b17b30ed20fe656421bd4d2248 (diff)
parent61619b3142c1de8f60f91964ff2656054d4f11a6 (diff)
downloadmongodb-8813daaab256108f7aa6300875e8562d031f2c2f.tar.gz
Merge tag 'upstream/2.0.5'
Upstream version 2.0.5
Diffstat (limited to 'jstests/replsets/reconfig.js')
-rw-r--r--jstests/replsets/reconfig.js18
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();