mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 22:53:26 +02:00
Add timeouts everywhere. Should help if the ADB socket gets stuck like it sometimes does.
This commit is contained in:
@@ -22,6 +22,7 @@ module.exports = syrup.serial()
|
||||
function openService() {
|
||||
log.info('Launching touch service')
|
||||
return devutil.ensureUnusedPort(adb, options.serial, service.port)
|
||||
.timeout(10000)
|
||||
.then(function() {
|
||||
return adb.shell(options.serial, [
|
||||
remote.bin
|
||||
@@ -29,6 +30,7 @@ module.exports = syrup.serial()
|
||||
, '--listen-input', service.port
|
||||
])
|
||||
})
|
||||
.timeout(10000)
|
||||
.then(function(out) {
|
||||
lifecycle.share('Touch shell', out)
|
||||
streamutil.talk(log, 'Touch shell says: "%s"', out)
|
||||
@@ -36,6 +38,7 @@ module.exports = syrup.serial()
|
||||
.then(function() {
|
||||
return devutil.waitForPort(adb, options.serial, service.port)
|
||||
})
|
||||
.timeout(15000)
|
||||
.then(function(conn) {
|
||||
return Promise.promisifyAll(monkey.connectStream(conn))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user