cadonna commented on a change in pull request #10266: URL: https://github.com/apache/kafka/pull/10266#discussion_r591236863
########## File path: streams/src/test/java/org/apache/kafka/streams/processor/internals/InternalTopicManagerTest.java ########## @@ -451,6 +465,550 @@ public void shouldExhaustRetriesOnMarkedForDeletionTopic() { ); } + @Test + public void shouldValidateSuccessfully() { + mockAdminClient.addTopic( + false, + topic1, + Collections.singletonList(new TopicPartitionInfo(0, broker1, cluster, Collections.emptyList())), + null + ); + final InternalTopicConfig internalTopicConfig = new RepartitionTopicConfig(topic1, Collections.emptyMap()); + internalTopicConfig.setNumberOfPartitions(1); + + final ValidationResult validationResult = internalTopicManager.validate(Collections.singletonMap(topic1, internalTopicConfig)); + + assertThat(validationResult.missingTopics, empty()); + assertThat(validationResult.misconfigurationsForTopics, anEmptyMap()); + } + + @Test + public void shouldValidateSuccessfullyWithEmptyInternalTopics() { + mockAdminClient.addTopic( + false, + topic1, + Collections.singletonList(new TopicPartitionInfo(0, broker1, cluster, Collections.emptyList())), + null + ); + final InternalTopicConfig internalTopicConfig = new RepartitionTopicConfig(topic1, Collections.emptyMap()); Review comment: Good catch! Thanks! ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org