divijvaidya commented on code in PR #15112: URL: https://github.com/apache/kafka/pull/15112#discussion_r1442788932
########## streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java: ########## @@ -1354,14 +1346,12 @@ public void shouldHandleTimeoutExceptionInTransitRestoredTaskToRunning() { final TaskManager taskManager = setUpTransitionToRunningOfRestoredTask(task, tasks); Review Comment: don't we want to do a `taskManager.setMainConsumer(mockitoConsumer);` here? (unless setUpTransitionToRunningOfRestoredTask is already doing so) ########## streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java: ########## @@ -4954,8 +4910,6 @@ public void shouldConvertStandbyTaskToActiveTask() { when(activeTaskCreator.createActiveTaskFromStandby(Mockito.eq(standbyTask), Mockito.eq(taskId00Partitions), any())) .thenReturn(activeTask); - replay(consumer); Review Comment: I assume that consumer is never used in these tests where we have removed the replay? In that case, should we do something similar to what you did in shouldReturnFalseWhenThereAreStillNonRunningTasks , i.e. test for no interactions ########## streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java: ########## @@ -4809,11 +4768,14 @@ public void shouldNotFailForTimeoutExceptionOnCommitWithEosAlpha() { exception.corruptedTasks(), equalTo(Collections.singleton(taskId00)) ); + + Mockito.verify(mockitoConsumer, times(2)).groupMetadata(); Review Comment: should it be called twice as per code? -- 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