diff --git a/tests/integration/integration.go b/tests/integration/integration.go index 0ae694dd3dac..4b16bcee18b4 100644 --- a/tests/integration/integration.go +++ b/tests/integration/integration.go @@ -12,6 +12,7 @@ import ( "os/user" "strings" "syscall" + "time" "github.com/k3s-io/k3s/pkg/flock" "github.com/pkg/errors" @@ -255,10 +256,11 @@ func K3sStopServer(server *K3sServer) error { if server.log != nil { server.log.Close() } + server.cmd.WaitDelay = 30 * time.Second if err := server.cmd.Process.Signal(syscall.SIGTERM); err != nil { return errors.Wrap(err, "failed to kill k3s process") } - if _, err := server.cmd.Process.Wait(); err != nil { + if err := server.cmd.Wait(); err != nil { return errors.Wrap(err, "failed to wait for k3s process exit") } return nil