diff --git a/admin_test.go b/admin_test.go index 370ee329c..c1493a54a 100644 --- a/admin_test.go +++ b/admin_test.go @@ -1794,6 +1794,7 @@ func TestDescribeLogDirsUnknownBroker(t *testing.T) { if err != nil { t.Fatal(err) } + defer safeClose(t, admin) type result struct { metadata map[int32][]DescribeLogDirsResponseDirMetadata diff --git a/sync_producer_test.go b/sync_producer_test.go index 33ca66ba7..d55444858 100644 --- a/sync_producer_test.go +++ b/sync_producer_test.go @@ -84,6 +84,7 @@ func TestSyncProducerTransactional(t *testing.T) { if err != nil { t.Fatal(err) } + defer safeClose(t, client) findCoordinatorResponse := new(FindCoordinatorResponse) findCoordinatorResponse.Coordinator = client.Brokers()[0]