1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 02:09:32 +02:00

devutil.killProcsByComm() was not falling back to SIGKILL like it should have been. Fixed. Also added a small delay between kill checks.

This commit is contained in:
Simo Kinnunen 2014-02-05 23:08:09 +09:00
parent 6893abdb75
commit 0a28757f62

View file

@ -120,7 +120,10 @@ devutil.waitForProcsToDie = function(adb, serial, comm, bin) {
return devutil.listPidsByComm(adb, serial, comm, bin)
.then(function(pids) {
if (pids.length) {
return devutil.waitForProcsToDie(adb, serial, comm, bin)
return Promise.delay(100)
.then(function() {
return devutil.waitForProcsToDie(adb, serial, comm, bin)
})
}
})
}
@ -140,8 +143,8 @@ devutil.killProcsByComm = function(adb, serial, comm, bin, mode) {
.then(function() {
return devutil.waitForProcsToDie(adb, serial, comm, bin)
})
.timeout(1000)
.then(function() {
.timeout(2000)
.catch(function() {
return devutil.killProcsByComm(adb, serial, comm, bin, -9)
})
})