Call server.Shutdown() as go routine (#33288)

server.Shutdown() blocks trying to write to s.shutdownFinished in some cases when using a test Grafana instance for a series of integration tests. 

See https://github.com/grafana/grafana/blob/master/pkg/server/server.go#L222-L224
This commit is contained in:
David Parrott
2021-04-22 13:23:08 -07:00
committed by GitHub
parent 463520c03c
commit aa5bdff97d

View File

@@ -58,7 +58,7 @@ func StartGrafana(t *testing.T, grafDir, cfgPath string, sqlStore *sqlstore.SQLS
}
}()
t.Cleanup(func() {
server.Shutdown("test cleanup")
go server.Shutdown("test cleanup")
})
// Wait for Grafana to be ready