diff options
author | Esha Maharishi <esha.maharishi@mongodb.com> | 2016-10-05 14:18:08 -0400 |
---|---|---|
committer | Esha Maharishi <esha.maharishi@mongodb.com> | 2016-10-05 18:13:57 -0400 |
commit | 4b675f39d1a3e911a3a0e34340294080c510c85b (patch) | |
tree | a684cd15de1bdbc723e3877213eedb5921027b14 /jstests | |
parent | 2b116377bbfe9bce97e69ea24e324e4a447f6ea5 (diff) | |
download | mongo-4b675f39d1a3e911a3a0e34340294080c510c85b.tar.gz |
SERVER-26197 remove print statements from assert.soon() in startup_with_all_configs_down.js
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/sharding/startup_with_all_configs_down.js | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/jstests/sharding/startup_with_all_configs_down.js b/jstests/sharding/startup_with_all_configs_down.js index e06ff98a674..e97442b6dd8 100644 --- a/jstests/sharding/startup_with_all_configs_down.js +++ b/jstests/sharding/startup_with_all_configs_down.js @@ -74,17 +74,22 @@ jsTestLog("Should now be possible to connect to the mongos that was started while the config " + "servers were down"); - var mongos2 = null; - assert.soon(function() { - try { - mongos2 = new Mongo(newMongosInfo.host); - return true; - } catch (e) { - printjson(e); - return false; - } - }); - assert.eq(100, mongos2.getDB('test').foo.find().itcount()); + var newMongosConn = null; + var caughtException = null; + assert.soon( + function() { + try { + newMongosConn = new Mongo(newMongosInfo.host); + return true; + } catch (e) { + caughtException = e; + return false; + } + }, + "Failed to connect to mongos after config servers were restarted: " + + tojson(caughtException)); + + assert.eq(100, newMongosConn.getDB('test').foo.find().itcount()); st.stop(); }()); |