From aa5bdff97d40c09df36539ed0cac2b6de990a2bd Mon Sep 17 00:00:00 2001 From: David Parrott Date: Thu, 22 Apr 2021 13:23:08 -0700 Subject: [PATCH] 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 --- pkg/tests/testinfra/testinfra.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/tests/testinfra/testinfra.go b/pkg/tests/testinfra/testinfra.go index 9c1e6f3716b..9077f71435b 100644 --- a/pkg/tests/testinfra/testinfra.go +++ b/pkg/tests/testinfra/testinfra.go @@ -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