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


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java:
##########
@@ -4521,11 +4385,18 @@ public void shouldListNotPausedTasks() {
         assertEquals(taskManager.notPausedTasks().size(), 0);
     }
 
-    private static void expectRestoreToBeCompleted(final Consumer<byte[], 
byte[]> consumer) {
+    private static void expectAssignmentToBeCalled(final Consumer<byte[], 
byte[]> consumer) {
         final Set<TopicPartition> assignment = singleton(new 
TopicPartition("assignment", 0));
-        expect(consumer.assignment()).andReturn(assignment);
-        consumer.resume(assignment);
-        expectLastCall();
+        when(consumer.assignment()).thenReturn(assignment);
+    }
+
+    private static void verifyResumeWasCalled(final Consumer<byte[], byte[]> 
consumer) {
+        final Set<TopicPartition> assignment = singleton(new 
TopicPartition("assignment", 0));
+        Mockito.verify(consumer, atLeastOnce()).resume(assignment);

Review Comment:
   There are a couple of tests where consumer.resume() is called twice. I will 
amend this to be stricter if possible



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