chia7712 commented on code in PR #15865:
URL: https://github.com/apache/kafka/pull/15865#discussion_r1590318726


##########
connect/runtime/src/main/java/org/apache/kafka/connect/storage/KafkaStatusBackingStore.java:
##########
@@ -160,7 +155,7 @@ public KafkaStatusBackingStore(Time time, Converter 
converter, Supplier<TopicAdm
 
     // visible for testing
     KafkaStatusBackingStore(Time time, Converter converter, String 
statusTopic, KafkaBasedLog<String, byte[]> kafkaLog) {
-        this(time, converter);
+        this(time, converter, null, "connect-distributed-");

Review Comment:
   This constructor is used by testing. It set `topicAdminSupplier` to null, so 
we have to handle the "null" `topicAdminSupplier` just for testing. That is a 
bit awkward to me. Could we require those test cases pass a 
`topicAdminSupplier` instead of `null`? Those tests can pass a fake 
`topicAdminSupplier` to constructor if they expect `topicAdminSupplier` should 
not be called in testing.
   
   
https://github.com/apache/kafka/blob/25118cec145b1a70a7b1709ca4a7ac367f066c6c/connect/runtime/src/test/java/org/apache/kafka/connect/storage/KafkaOffsetBackingStoreTest.java#L137
 



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