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


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumerTest.java:
##########
@@ -2029,6 +2030,27 @@ 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");

Review Comment:
   I have just dived into the constructor and found that reproducing the noisy 
close scenario is pretty tricky.
   In the context of Kafka, most cases will return early due to the 
`groupMetadata.isEmpty`.
   I suppose the scenario might only occur at the JVM level, such as an OOM 
during construction.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to