guozhangwang commented on code in PR #13318: URL: https://github.com/apache/kafka/pull/13318#discussion_r1128773556
########## streams/src/test/java/org/apache/kafka/streams/processor/internals/RackAwarenessStreamsPartitionAssignorTest.java: ########## @@ -169,26 +166,6 @@ private void createMockTaskManager() { topologyMetadata.buildAndRewriteTopology(); } - // If you don't care about setting the end offsets for each specific topic partition, the helper method Review Comment: This is piggy-backed as part of incorporating 2): I found that these funcs are duplicated across multiple test classes from `AssignmentTestUtils.createMockAdminClientForAssignor`, so I removed them. ########## streams/src/test/java/org/apache/kafka/streams/processor/internals/HighAvailabilityStreamsPartitionAssignorTest.java: ########## @@ -149,35 +145,12 @@ private void configurePartitionAssignorWith(final Map<String, Object> props) { overwriteInternalTopicManagerWithMock(); } - // Useful for tests that don't care about the task offset sums Review Comment: This is found that after we refactored with mockito, the passed in task set is not needed any more, so I removed them to eliminate the warnings. ########## streams/src/test/java/org/apache/kafka/streams/processor/internals/HighAvailabilityStreamsPartitionAssignorTest.java: ########## @@ -149,35 +145,12 @@ private void configurePartitionAssignorWith(final Map<String, Object> props) { overwriteInternalTopicManagerWithMock(); } - // Useful for tests that don't care about the task offset sums - private void createMockTaskManager(final Set<TaskId> activeTasks) { - createMockTaskManager(getTaskOffsetSums(activeTasks)); - } - - private void createMockTaskManager(final Map<TaskId, Long> taskOffsetSums) { + private void createMockTaskManager() { when(taskManager.topologyMetadata()).thenReturn(topologyMetadata); when(taskManager.processId()).thenReturn(UUID_1); topologyMetadata.buildAndRewriteTopology(); } - // If you don't care about setting the end offsets for each specific topic partition, the helper method Review Comment: Ditto here. -- 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