mjsax commented on a change in pull request #9940:
URL: https://github.com/apache/kafka/pull/9940#discussion_r561429380



##########
File path: 
streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java
##########
@@ -2779,6 +2779,62 @@ public void suspend() {
         assertThat(task01.state(), is(Task.State.SUSPENDED));
     }
 
+    @Test
+    public void shouldConvertActiveTaskToStandbyTask() {
+        final StreamTask activeTask = mock(StreamTask.class);
+        expect(activeTask.id()).andReturn(taskId00).anyTimes();
+        
expect(activeTask.inputPartitions()).andReturn(taskId00Partitions).anyTimes();

Review comment:
       Will fix right away -- Jenkins failed anyway and we need to rerun it.

##########
File path: 
streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java
##########
@@ -190,7 +190,7 @@ public void 
shouldIdempotentlyUpdateSubscriptionFromActiveAssignment() {
         final TopicPartition newTopicPartition = new TopicPartition("topic2", 
1);
         final Map<TaskId, Set<TopicPartition>> assignment = 
mkMap(mkEntry(taskId01, mkSet(t1p1, newTopicPartition)));
 
-        expect(activeTaskCreator.createTasks(anyObject(), 
eq(assignment))).andReturn(emptyList()).anyTimes();
+        expect(activeTaskCreator.createTasks(anyObject(), 
eq(assignment))).andStubReturn(emptyList());

Review comment:
       @ableegoldman I just update the whole test class...

##########
File path: 
streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java
##########
@@ -2647,8 +2647,7 @@ public void 
shouldNotFailForTimeoutExceptionOnCommitWithEosAlpha() {
         task01.setCommittableOffsetsAndMetadata(offsetsT01);
         final StateMachineTask task02 = new StateMachineTask(taskId02, 
taskId02Partitions, true);
 
-        consumer.groupMetadata();
-        expectLastCall().andReturn(null).anyTimes();
+        expect(consumer.groupMetadata()).andStubReturn(null);

Review comment:
       Another simplification; make it a one-liner. Same below.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to