frankvicky commented on code in PR #19975:
URL: https://github.com/apache/kafka/pull/19975#discussion_r2151716431


##########
clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java:
##########
@@ -1974,12 +1974,9 @@ public void testCloseShouldBeIdempotent(GroupProtocol 
groupProtocol) {
     @ParameterizedTest
     @EnumSource(GroupProtocol.class)
     public void 
testOperationsBySubscribingConsumerWithDefaultGroupId(GroupProtocol 
groupProtocol) {
-        try {
-            newConsumer(groupProtocol, null, Optional.of(Boolean.TRUE));
-            fail("Expected an InvalidConfigurationException");
-        } catch (InvalidConfigurationException swallow) {
-            // OK, expected
-        }
+        assertThrows(InvalidConfigurationException.class,
+            () -> newConsumer(groupProtocol, null, Optional.of(Boolean.TRUE)),

Review Comment:
   Out of curiosity, why do we use `Boolean.TRUE` here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to