mirror of https://github.com/hashicorp/consul
test: test server should auto cleanup (#11779)
parent
7a365fa0da
commit
592ac8f96a
|
@ -285,6 +285,7 @@ func newServer(t *testing.T, c *Config) (*Server, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
t.Cleanup(func() { srv.Shutdown() })
|
||||
|
||||
// wait until after listen
|
||||
<-up
|
||||
|
|
Loading…
Reference in New Issue