1
0
mirror of https://github.com/golang/go synced 2024-09-29 03:24:29 -06:00

os/exec: fix TestWaitInterrupt/WaitDelay error message

As the comments say. Here we expect err to be nil instead of ctx.Err()
This commit is contained in:
scott 2022-11-11 11:43:35 +08:00
parent d62f8d5f2b
commit 6bedfbc9d2

View File

@ -1357,7 +1357,7 @@ func TestWaitInterrupt(t *testing.T) {
// context expired, a successful exit is valid (even if late) and does
// not merit a non-nil error.
if err != nil {
t.Errorf("Wait: %v; want %v", err, ctx.Err())
t.Errorf("Wait: %v; want nil", err)
}
if ps := cmd.ProcessState; !ps.Exited() {
t.Errorf("cmd did not exit: %v", ps)