test: test server should auto cleanup (#11779)

This commit is contained in:
R.B. Boyer 2021-12-08 13:26:06 -06:00 committed by GitHub
parent 32a04317bf
commit 957758cb61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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