From 65fc9a28eb5494e1486e78db9b5e091815e8319c Mon Sep 17 00:00:00 2001 From: Simo Kinnunen Date: Fri, 25 Jul 2014 17:52:24 +0900 Subject: [PATCH] Increase installation timeout and make sure that there's a separate timeout if there's a need to uninstall first. --- lib/roles/device/plugins/install.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/roles/device/plugins/install.js b/lib/roles/device/plugins/install.js index 0084ce4f..ca398f9b 100644 --- a/lib/roles/device/plugins/install.js +++ b/lib/roles/device/plugins/install.js @@ -97,6 +97,7 @@ module.exports = syrup.serial() sendProgress('installing_app', guesstimate) return promiseutil.periodicNotify( adb.installRemote(options.serial, apk) + .timeout(60000) .catch(function(err) { switch (err.code) { case 'INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES': @@ -105,11 +106,13 @@ module.exports = syrup.serial() , pkg ) return adb.uninstall(options.serial, pkg) + .timeout(15000) .then(function() { return adb.installRemote(options.serial, apk) + .timeout(60000) }) default: - throw err + return Promise.reject(err) } }) , 250 @@ -121,7 +124,6 @@ module.exports = syrup.serial() ) sendProgress('installing_app', guesstimate) }) - .timeout(35000) }) .then(function() { if (message.launch) {