You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Ken Huang (Jira)" <ji...@apache.org> on 2026/09/07 12:26:00 UTC
[jira] [Resolved] (KAFKA-20942) Refactor empty catch blocks in clients module tests to use assertThrows
[ https://issues.apache.org/jira/browse/KAFKA-20942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ken Huang resolved KAFKA-20942.
-------------------------------
Resolution: Fixed
> Refactor empty catch blocks in clients module tests to use assertThrows
> -----------------------------------------------------------------------
>
> Key: KAFKA-20942
> URL: https://issues.apache.org/jira/browse/KAFKA-20942
> Project: Kafka
> Issue Type: Improvement
> Components: clients
> Affects Versions: 4.3.1
> Reporter: Kapil Hadoltikar
> Assignee: Kapil Hadoltikar
> Priority: Minor
>
> Refactor test classes in the clients module that use try-fail-catch blocks with empty catch blocks to assert expected exceptions. Update them to use JUnit 5's `assertThrows()` to ensure strict and safe exception validation and prevent false test positives.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)