mehbey commented on code in PR #13681: URL: https://github.com/apache/kafka/pull/13681#discussion_r1212275329
########## streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java: ########## @@ -3137,13 +3102,11 @@ public Set<TopicPartition> changelogPartitions() { } }; - expect(activeTaskCreator.createTasks(anyObject(), eq(assignment))).andStubReturn(singletonList(task00)); - activeTaskCreator.closeAndRemoveTaskProducerIfNeeded(eq(taskId00)); - expectLastCall(); - activeTaskCreator.closeThreadProducerIfNeeded(); - expectLastCall().andThrow(new RuntimeException("whatever")); + when(activeTaskCreator.createTasks(any(), Mockito.eq(assignment))).thenReturn(singletonList(task00)); + doThrow(new RuntimeException("whatever")).when(activeTaskCreator).closeThreadProducerIfNeeded(); expect(standbyTaskCreator.createTasks(eq(emptyMap()))).andStubReturn(emptyList()); - replay(activeTaskCreator, standbyTaskCreator); + expect(standbyTaskCreator.createTasks(eq(emptyMap()))).andStubReturn(emptyList()); Review Comment: removed duplicate -- 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