C0urante commented on code in PR #13375: URL: https://github.com/apache/kafka/pull/13375#discussion_r1150865465
########## connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/EmbeddedKafkaCluster.java: ########## @@ -656,6 +567,19 @@ public KafkaProducer<byte[], byte[]> createProducer(Map<String, Object> producer return producer; } + private void addDefaultBrokerPropsIfAbsent(Properties brokerConfig, int numBrokers) { + putIfAbsent(brokerConfig, KafkaConfig.DeleteTopicEnableProp(), "true"); + putIfAbsent(brokerConfig, KafkaConfig.GroupInitialRebalanceDelayMsProp(), "0"); + putIfAbsent(brokerConfig, KafkaConfig.OffsetsTopicReplicationFactorProp(), String.valueOf(numBrokers)); + putIfAbsent(brokerConfig, KafkaConfig.AutoCreateTopicsEnableProp(), "false"); + } + + private static void putIfAbsent(final Properties props, final String propertyKey, final Object propertyValue) { + if (!props.containsKey(propertyKey)) { + props.put(propertyKey, propertyValue); + } + } Review Comment: Either way is fine, not a blocker but would be nice 👍 -- 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