From bb6aba4a00f157988216c2f2d52129da30e321de Mon Sep 17 00:00:00 2001 From: Josef Johansson Date: Sun, 3 Mar 2024 20:07:31 +0100 Subject: [PATCH] pkg/http/server_test.go: Add gleak to find goroutine leaks Signed-off-by: Josef Johansson --- pkg/http/server_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/http/server_test.go b/pkg/http/server_test.go index 4d4ab860..e10979bf 100644 --- a/pkg/http/server_test.go +++ b/pkg/http/server_test.go @@ -12,6 +12,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" + . "github.com/onsi/gomega/gleak" ) const hello = "Hello World!" @@ -559,6 +560,8 @@ var _ = Describe("Server", func() { AfterEach(func() { cancel() + Eventually(Goroutines).ShouldNot(HaveLeaked()) + }) Context("with an ipv4 http server", func() {