Add sleep between Terminate and Kill

pull/5315/head
Thomas Stromberg 2019-09-11 15:22:33 -07:00
parent 7c2801f565
commit 6639489ce9
1 changed files with 2 additions and 0 deletions

View File

@ -345,6 +345,8 @@ func killProcessFamily(t *testing.T, pid int) {
t.Logf("unable to terminate pid %d: %v", p.Pid, err)
continue
}
// Allow process a chance to cleanup before instant death.
time.Sleep(100 * time.Millisecond)
if err := p.Kill(); err != nil {
t.Logf("unable to kill pid %d: %v", p.Pid, err)
continue