From de59336e5a9b1f417cb06904486929c0fb7d34d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20F=C3=B6ld=C3=A9nyi?= Date: Sat, 7 Dec 2024 17:46:04 +0100 Subject: [PATCH] Fixed context leak in test case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miklós Földényi --- pkg/block/fetcher_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/block/fetcher_test.go b/pkg/block/fetcher_test.go index 578b287473..72e62b8da1 100644 --- a/pkg/block/fetcher_test.go +++ b/pkg/block/fetcher_test.go @@ -1224,7 +1224,8 @@ func Test_ConcurrentLister_channel_deadlock(t *testing.T) { outputChannel := make(chan ulid.ULID) defer close(outputChannel) - timeout, _ := context.WithTimeout(context.Background(), time.Second*5) + timeout, cancel := context.WithTimeout(context.Background(), time.Second*5) + defer cancel() _, err := lister.GetActiveAndPartialBlockIDs(timeout, outputChannel)