diff --git a/sdk/testutil/server.go b/sdk/testutil/server.go index a28591ef1..052505674 100644 --- a/sdk/testutil/server.go +++ b/sdk/testutil/server.go @@ -26,6 +26,7 @@ import ( "strings" "testing" "time" + "runtime" "github.com/hashicorp/consul/sdk/freeport" "github.com/hashicorp/consul/sdk/testutil/retry" @@ -350,8 +351,14 @@ func (s *TestServer) Stop() error { } if s.cmd.Process != nil { - if err := s.cmd.Process.Signal(os.Interrupt); err != nil { - return errors.Wrap(err, "failed to kill consul server") + if runtime.GOOS == "windows" { + if err := s.cmd.Process.Kill(); err != nil { + return errors.Wrap(err, "failed to kill consul server") + } + } else { // interrupt is not supported in windows + if err := s.cmd.Process.Signal(os.Interrupt); err != nil { + return errors.Wrap(err, "failed to kill consul server") + } } }