mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:23:28 +02:00
Add timeouts everywhere. Should help if the ADB socket gets stuck like it sometimes does.
This commit is contained in:
@@ -30,8 +30,10 @@ module.exports = syrup.serial()
|
||||
|
||||
function getPath() {
|
||||
return adb.shell(options.serial, ['pm', 'path', resource.pkg])
|
||||
.timeout(10000)
|
||||
.then(function(out) {
|
||||
return streamutil.findLine(out, (/^package:/))
|
||||
.timeout(15000)
|
||||
.then(function(line) {
|
||||
return line.substr(8)
|
||||
})
|
||||
@@ -49,6 +51,7 @@ module.exports = syrup.serial()
|
||||
, installedPath
|
||||
, resource.main
|
||||
))
|
||||
.timeout(10000)
|
||||
.then(function(out) {
|
||||
return streamutil.readAll(out)
|
||||
.timeout(10000)
|
||||
@@ -69,6 +72,7 @@ module.exports = syrup.serial()
|
||||
.catch(function() {
|
||||
log.info('Installing STFService')
|
||||
return adb.install(options.serial, resource.apk)
|
||||
.timeout(30000)
|
||||
.then(function() {
|
||||
return getPath()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user