mirror of
https://github.com/apache/kafka.git
synced 2026-10-28 08:24:58 +08:00
Follow-up to #23604. Several tests create a client, metrics, or log manager that the cleanup method never closes, either because a local variable shadows the field closed in `@AfterEach`, or because the field set up in `@BeforeEach` is reassigned without closing the old instance. This fixes the same pattern in `KafkaConsumerTest`, `MetricsTest`, `LogManagerTest`, and `WorkerTaskTest`. Generated-by: Claude Opus 5.5 Reviewers: Chia-Ping Tsai <chia7712@gmail.com>