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)