mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:13:24 +02:00
Promise.timeout() doesn't stack (i.e. foo.timeout(1000).timeout(1000) doesn't mean "wait 1000ms, then another 1000ms", it means that we have two 1000ms timeouts running at the same time). Fix places where it could be a problem.
This commit is contained in:
@@ -26,20 +26,20 @@ module.exports = syrup.serial()
|
||||
.timeout(10000)
|
||||
.then(function() {
|
||||
return adb.shell(options.serial, [
|
||||
remote.bin
|
||||
, '--lib', remote.lib
|
||||
, '--listen-input', service.port
|
||||
])
|
||||
remote.bin
|
||||
, '--lib', remote.lib
|
||||
, '--listen-input', service.port
|
||||
])
|
||||
.timeout(10000)
|
||||
})
|
||||
.timeout(10000)
|
||||
.then(function(out) {
|
||||
lifecycle.share('Touch shell', out)
|
||||
streamutil.talk(log, 'Touch shell says: "%s"', out)
|
||||
})
|
||||
.then(function() {
|
||||
return devutil.waitForPort(adb, options.serial, service.port)
|
||||
.timeout(15000)
|
||||
})
|
||||
.timeout(15000)
|
||||
.then(function(conn) {
|
||||
return Promise.promisifyAll(monkey.connectStream(conn))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user