From b96951708ca8d4ac87d38e6c0471bb86ab2f9756 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 18 Dec 2023 12:35:00 +0200 Subject: [PATCH] push_test.go: properly close the created httptest.Server after every test call --- push_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/push_test.go b/push_test.go index eedcb76..9048b22 100644 --- a/push_test.go +++ b/push_test.go @@ -89,6 +89,7 @@ func TestInitPushWithOptions(t *testing.T) { firstRequest = false } })) + defer srv.Close() ctx, cancel := context.WithCancel(context.Background()) if err := s.InitPushWithOptions(ctx, srv.URL, time.Millisecond, opts); err != nil { t.Fatalf("unexpected error: %s", err)