diff --git a/lib/server/controller.js b/lib/server/controller.js index 80a8fa1c3..113f9f333 100644 --- a/lib/server/controller.js +++ b/lib/server/controller.js @@ -29,6 +29,11 @@ exports.getGlobalBeforeFilter = function (appium) { logger.debug("Request received with params: " + JSON.stringify(req.body)); } if (proxy.shouldProxy(req)) { + if (req.appium.commandTimeout) { + // if we're proxying, we never get into the sessionBeforeFilter, + // so let's make sure to reset the timeout on every request still + req.appium.resetTimeout(); + } if (typeof req.device.translatePath !== "undefined") { req.device.translatePath(req); } diff --git a/test/functional/selendroid/basic-specs.js b/test/functional/selendroid/basic-specs.js index e8f268a59..b9047541d 100644 --- a/test/functional/selendroid/basic-specs.js +++ b/test/functional/selendroid/basic-specs.js @@ -113,7 +113,7 @@ describe('selendroid - basic -', function () { describe('command timeouts', function () { var driver; - setup(this, _.defaults({newCommandTimeout: 7}, desired)) + setup(this, _.defaults({newCommandTimeout: 3}, desired)) .then(function (d) { driver = d; }); it('should not die if commands come in', function (done) { @@ -126,11 +126,7 @@ describe('selendroid - basic -', function () { .then(find); } else return new Q(); }; - find().then(function () { - return driver - .sleep(10000) - .elementByName('Animation').should.be.rejected; - }).nodeify(done); + find().nodeify(done); }); });