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 7a365fa0da
commit 592ac8f96a
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 {
return nil, err
}
t.Cleanup(func() { srv.Shutdown() })
// wait until after listen
<-up