oscerd commented on code in PR #26521:
URL: https://github.com/apache/camel/pull/26521#discussion_r4029169700


##########
components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaConfigurationTest.java:
##########
@@ -81,6 +81,13 @@ void batchingDisablesAutoCommit() {
         assertEquals(false, 
props.get(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG));
     }
 
+    @Test
+    void maxPollRecordsDefaultsTo500() {
+        // CAMEL-24778: the field must carry the documented default at 
runtime. In batching mode the value is
+        // read directly (to size the batch buffer), so a null default there 
throws a NullPointerException.
+        assertEquals(500, new 
KafkaConfiguration().getMaxPollRecords().intValue());

Review Comment:
   Good call — removed `maxPollRecordsDefaultsTo500()`. The 
`processorConstructsWithDefaultMaxPollRecords()` test in the batching class 
already guards the actual regression (it constructs the batch processor with a 
default configuration, which NPE'd before the fix), so the invariant stays 
covered. Thanks!
   
   _Claude Code on behalf of @oscerd_
   



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