clolov commented on code in PR #15261:
URL: https://github.com/apache/kafka/pull/15261#discussion_r1481561392


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java:
##########
@@ -2332,19 +2335,12 @@ public void 
shouldCloseActiveUnassignedSuspendedTasksWhenClosingRevokedTasks() {
         task00.setCommittableOffsetsAndMetadata(offsets);
 
         // first `handleAssignment`
-        expectRestoreToBeCompleted(consumer);
-        when(activeTaskCreator.createTasks(any(), 
Mockito.eq(taskId00Assignment))).thenReturn(singletonList(task00));
-        expectLastCall();
-
-        // `handleRevocation`
-        consumer.commitSync(offsets);
-        expectLastCall();
+        final Set<TopicPartition> assignment = singleton(new 
TopicPartition("assignment", 0));
+        when(mockitoConsumer.assignment()).thenReturn(assignment);

Review Comment:
   Same reply as in 
https://github.com/apache/kafka/pull/15261#discussion_r1481560896



##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java:
##########
@@ -2358,6 +2354,7 @@ public void 
shouldCloseActiveUnassignedSuspendedTasksWhenClosingRevokedTasks() {
         assertThat(taskManager.activeTaskMap(), Matchers.anEmptyMap());
         assertThat(taskManager.standbyTaskMap(), Matchers.anEmptyMap());
         
Mockito.verify(activeTaskCreator).closeAndRemoveTaskProducerIfNeeded(taskId00);
+        Mockito.verify(mockitoConsumer).resume(assignment);

Review Comment:
   Same reply as in 
https://github.com/apache/kafka/pull/15261#discussion_r1481560896



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