mirror of
https://github.com/appium/appium.git
synced 2026-02-10 20:09:49 -06:00
fix selendroid command timeout bug and fix test that proves it work
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user