test: test server should auto cleanup (#11779)
This commit is contained in:
parent
32a04317bf
commit
957758cb61
|
@ -285,6 +285,7 @@ func newServer(t *testing.T, c *Config) (*Server, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
t.Cleanup(func() { srv.Shutdown() })
|
||||||
|
|
||||||
// wait until after listen
|
// wait until after listen
|
||||||
<-up
|
<-up
|
||||||
|
|
Loading…
Reference in New Issue