Add timeouts everywhere. Should help if the ADB socket gets stuck like it sometimes does.

This commit is contained in:
Simo Kinnunen
2014-04-02 11:58:53 +09:00
parent 64d4782436
commit 0ce65687c5
10 changed files with 51 additions and 5 deletions

View File

@@ -49,6 +49,7 @@ module.exports = syrup.serial()
var target = '/data/local/tmp/_app.apk'
return adb.push(options.serial, source, target)
.timeout(10000)
.then(function(transfer) {
var resolver = Promise.defer()
@@ -93,6 +94,7 @@ module.exports = syrup.serial()
sendProgress('Installing app', 80)
return adb.installRemote(options.serial, apk)
})
.timeout(10000)
.then(function() {
if (message.launchActivity) {
log.info(
@@ -105,6 +107,7 @@ module.exports = syrup.serial()
return adb.startActivity(options.serial, message.launchActivity)
}
})
.timeout(15000)
.then(function() {
push.send([
channel