wait for result

This commit is contained in:
Alex Dadgar
2018-05-31 17:31:32 -07:00
parent a4e11c8134
commit 657dd1e241

View File

@@ -349,9 +349,15 @@ func TestRawExecDriver_Start_Kill_Wait_Cgroup(t *testing.T) {
t.Fatalf("timeout")
}
if err := process.Signal(syscall.Signal(0)); err == nil {
t.Fatalf("process should not exist: %v", pid)
}
testutil.WaitForResult(func() (bool, error) {
if err := process.Signal(syscall.Signal(0)); err == nil {
return false, fmt.Errorf("process should not exist: %v", pid)
}
return true, nil
}, func(err error) {
t.Fatalf("err: %v", err)
})
}
func TestRawExecDriver_HandlerExec(t *testing.T) {