mjsax commented on code in PR #20723:
URL: https://github.com/apache/kafka/pull/20723#discussion_r2496834115
##########
streams/src/test/java/org/apache/kafka/streams/StreamsConfigTest.java:
##########
@@ -442,6 +442,51 @@ public void
shouldOverrideAdminDefaultAdminClientEnableTelemetry() {
assertTrue((boolean)
returnedProps.get(AdminClientConfig.ENABLE_METRICS_PUSH_CONFIG));
}
+ @Test
+ public void testAutoCreateTopicsCannotBeOverriddenForStreamsConsumers() {
+ // User tries to override the setting
+
props.put(StreamsConfig.consumerPrefix(ConsumerConfig.ALLOW_AUTO_CREATE_TOPICS_CONFIG),
"true");
+
props.put(StreamsConfig.restoreConsumerPrefix(ConsumerConfig.ALLOW_AUTO_CREATE_TOPICS_CONFIG),
"true");
+
props.put(StreamsConfig.globalConsumerPrefix(ConsumerConfig.ALLOW_AUTO_CREATE_TOPICS_CONFIG),
"true");
+
props.put(StreamsConfig.mainConsumerPrefix(ConsumerConfig.ALLOW_AUTO_CREATE_TOPICS_CONFIG),
"true");
Review Comment:
It seems we do not really test both prefix with this test setup. Because we
set both the generic `consumer.` and the individual consumer prefix, the
verification below will always fail on the former, and we never reach the code
to fail on the later.
Guess we need to split into two test, one test using only `consumer.` (which
set it's on all three cosumers), and one with set it's three time for each
consumer indivivually.
--
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]