kirktrue commented on code in PR #14670:
URL: https://github.com/apache/kafka/pull/14670#discussion_r1384203100


##########
clients/src/test/java/org/apache/kafka/clients/consumer/ConsumerConfigTest.java:
##########
@@ -66,18 +66,24 @@ public void testOverrideClientId() {
 
     @Test
     public void testOverrideEnableAutoCommit() {
-        ConsumerConfig config = new ConsumerConfig(properties);
-        boolean overrideEnableAutoCommit = 
config.maybeOverrideEnableAutoCommit();
-        assertFalse(overrideEnableAutoCommit);
-
-        properties.setProperty(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, 
"true");
-        config = new ConsumerConfig(properties);
-        try {
-            config.maybeOverrideEnableAutoCommit();
-            fail("Should have thrown an exception");
-        } catch (InvalidConfigurationException e) {
-            // expected
-        }
+        // Verify that our default properties (no 'enable.auto.commit' or 
'group.id') are valid.
+        assertDoesNotThrow(() -> new ConsumerConfig(properties));
+
+        // Verify that explicitly disabling 'enable.auto.commit' still works.
+        properties.setProperty(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, 
Boolean.FALSE.toString());
+        assertDoesNotThrow(() -> new ConsumerConfig(properties));

Review Comment:
   Done.



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