cowlike commented on code in PR #12769: URL: https://github.com/apache/kafka/pull/12769#discussion_r1007313398
########## connect/mirror/src/test/java/org/apache/kafka/connect/mirror/MirrorSourceConnectorTest.java: ########## @@ -319,4 +320,17 @@ public void testRefreshTopicPartitionsTopicOnTargetFirst() throws Exception { connector.refreshTopicPartitions(); verify(connector, times(1)).computeAndCreateTopicPartitions(); } + + @Test + public void testIsCycleWithNullUpstreamTopic() throws Exception { + class BadReplicationPolicy extends DefaultReplicationPolicy { Review Comment: > What about `CustomReplicationPolicy` as it's not really a bad policy, `null` is allowed `CustomReplicationPolicy` will not fail the test since it ends up returning `false` after the first line of `isCycle` returns null: ```java boolean isCycle(String topic) { String source = replicationPolicy.topicSource(topic); //... ``` -- 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