Skip to content

Commit

Permalink
Increased device connection timeout to 2mins
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrebnov committed Apr 6, 2016
1 parent 55d4873 commit efc9753
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/paramedic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 120000; // 2mins

function ParamedicRunner(config, _callback) {
this.tempFolder = null;
this.pluginsManager = null;
Expand Down Expand Up @@ -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() {
Expand All @@ -203,7 +206,7 @@ ParamedicRunner.prototype.waitForConnection = function() {
} else {
resolve();
}
}, MAX_PENDING_TIME);
}, INITIAL_CONNECTION_TIMEOUT);
});
};

Expand Down

0 comments on commit efc9753

Please sign in to comment.