mjsax commented on code in PR #14164:
URL: https://github.com/apache/kafka/pull/14164#discussion_r1287680080


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamsPartitionAssignorTest.java:
##########
@@ -272,27 +300,50 @@ private void createMockTaskManager(final Set<TaskId> 
activeTasks,
     // If mockCreateInternalTopics is true the internal topic manager will 
report that it had to create all internal
     // topics and we will skip the listOffsets request for these changelogs
     private MockInternalTopicManager 
overwriteInternalTopicManagerWithMock(final boolean mockCreateInternalTopics) {
-        final MockInternalTopicManager mockInternalTopicManager = new 
MockInternalTopicManager(
+        return overwriteInternalTopicManagerWithMock(mockCreateInternalTopics, 
null);
+    }
+
+    private MockInternalTopicManager 
overwriteInternalTopicManagerWithMock(final boolean mockCreateInternalTopics, 
final List<Map<String, List<TopicPartitionInfo>>> topicPartitionInfo) {
+        final MockInternalTopicManager mockInternalTopicManager = spy(new 
MockInternalTopicManager(
             time,
             new StreamsConfig(configProps()),
             mockClientSupplier.restoreConsumer,
             mockCreateInternalTopics
-        );
+        ));
+
+        if (topicPartitionInfo != null) {
+            
lenient().when(mockInternalTopicManager.getTopicPartitionInfo(anySet())).thenAnswer(
+                i -> {

Review Comment:
   So `i` is the input parameter passed into `getTopicPartitionInfo` ? -- Can 
we find a better name?



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