chia7712 commented on code in PR #20491:
URL: https://github.com/apache/kafka/pull/20491#discussion_r2332025981


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumerTest.java:
##########
@@ -2029,6 +2030,28 @@ public void 
testRecordBackgroundEventQueueSizeAndBackgroundEventQueueTime() {
         assertEquals(10, (double) 
metrics.metric(metrics.metricName("background-event-queue-time-max", 
CONSUMER_METRIC_GROUP)).metricValue());
     }
 
+    @Test
+    public void testFailConstructor() {
+        final Properties props = requiredConsumerConfig();
+        props.put(ConsumerConfig.GROUP_ID_CONFIG, "group-id");
+        props.put(ConsumerConfig.METRIC_REPORTER_CLASSES_CONFIG, 
"an.invalid.class");
+        final ConsumerConfig config = new ConsumerConfig(props);
+
+        try (LogCaptureAppender appender = 
LogCaptureAppender.createAndRegister()) {

Review Comment:
   It seems that code was copied from 
`ShareConsumerImplTest#testFailConstructor` with some improvements -- for 
example, the `appender` now gets closed :)
   
   @gensericghiro Do you have a free cycle to file a MINOR patch to fix it in 
`ShareConsumerImplTest#testFailConstructor`?



-- 
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