summaryrefslogtreecommitdiff
path: root/jstests/sharding/startup_with_all_configs_down.js
diff options
context:
space:
mode:
authorEsha Maharishi <esha.maharishi@mongodb.com>2016-10-05 14:18:08 -0400
committerEsha Maharishi <esha.maharishi@mongodb.com>2016-10-05 18:13:57 -0400
commit4b675f39d1a3e911a3a0e34340294080c510c85b (patch)
treea684cd15de1bdbc723e3877213eedb5921027b14 /jstests/sharding/startup_with_all_configs_down.js
parent2b116377bbfe9bce97e69ea24e324e4a447f6ea5 (diff)
downloadmongo-4b675f39d1a3e911a3a0e34340294080c510c85b.tar.gz
SERVER-26197 remove print statements from assert.soon() in startup_with_all_configs_down.js
Diffstat (limited to 'jstests/sharding/startup_with_all_configs_down.js')
-rw-r--r--jstests/sharding/startup_with_all_configs_down.js27
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();
}());