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:
Simo Kinnunen
2014-04-22 16:48:13 +09:00
parent 24620076b3
commit a4a0a62a66
7 changed files with 26 additions and 25 deletions

View File

@@ -24,16 +24,16 @@ module.exports = syrup.serial()
, '--lib', remote.lib
, '--listen-stats', service.port
])
.timeout(10000)
.then(function(out) {
lifecycle.share('Stats shell', out)
streamutil.talk(log, 'Stats shell says: "%s"', out)
})
})
.timeout(10000)
.then(function() {
return devutil.waitForPort(adb, options.serial, service.port)
.timeout(15000)
})
.timeout(15000)
.then(function(conn) {
return lifecycle.share('Stats connection', conn)
})