From 3334d3e0423a54443ef6977580afa73e7eea1d0a Mon Sep 17 00:00:00 2001 From: sgrebnov Date: Wed, 6 Apr 2016 20:03:04 +0300 Subject: [PATCH] Increased device connection timeout to 5mins --- lib/paramedic.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/paramedic.js b/lib/paramedic.js index a38a349f..2b611aa4 100644 --- a/lib/paramedic.js +++ b/lib/paramedic.js @@ -29,6 +29,10 @@ var exec = require('./utils').exec, getReporters = require('./Reporters'), logger = require('./utils').logger; +// Time to wait for initial device connection. +// If device has not connected within this interval the tests are stopped. +var INITIAL_CONNECTION_TIMEOUT = 300000; // 5mins + function ParamedicRunner(config, _callback) { this.tempFolder = null; this.pluginsManager = null; @@ -193,8 +197,7 @@ ParamedicRunner.prototype.shouldWaitForTestResult = function() { ParamedicRunner.prototype.waitForConnection = function() { var self = this; - var MAX_PENDING_TIME = 60000, - ERR_MSG = 'Seems like device not connected to local server in ' + MAX_PENDING_TIME / 1000 + ' secs'; + var ERR_MSG = 'Seems like device not connected to local server in ' + INITIAL_CONNECTION_TIMEOUT / 1000 + ' secs'; return Q.promise(function(resolve, reject) { setTimeout(function() { @@ -203,7 +206,7 @@ ParamedicRunner.prototype.waitForConnection = function() { } else { resolve(); } - }, MAX_PENDING_TIME); + }, INITIAL_CONNECTION_TIMEOUT); }); };