From 27a6e1e174786d2f9be769e0c200d9f395f2eb30 Mon Sep 17 00:00:00 2001 From: lzhfromustc <43191155+lzhfromustc@users.noreply.github.com> Date: Thu, 10 Dec 2020 04:09:21 -0500 Subject: [PATCH] test: add buffer to channel to avoid goroutine leak (#8274) Signed-off-by: lzhfromustc --- cmd/prometheus/main_unix_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/prometheus/main_unix_test.go b/cmd/prometheus/main_unix_test.go index 7e1ebb01be..393c6f952c 100644 --- a/cmd/prometheus/main_unix_test.go +++ b/cmd/prometheus/main_unix_test.go @@ -37,7 +37,7 @@ func TestStartupInterrupt(t *testing.T) { return } - done := make(chan error) + done := make(chan error, 1) go func() { done <- prom.Wait() }()