shashankhs11 commented on code in PR #20692:
URL: https://github.com/apache/kafka/pull/20692#discussion_r2426607232


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java:
##########
@@ -1805,11 +1783,13 @@ public void 
shouldComputeOffsetSumForRunningStatefulTask() {
         final StreamTask runningStatefulTask = statefulTask(taskId00, 
taskId00ChangelogPartitions)
             .inState(State.RUNNING).build();
         final long changelogOffsetOfRunningTask = Task.LATEST_OFFSET;
-        when(runningStatefulTask.changelogOffsets())
-            .thenReturn(mkMap(mkEntry(t1p0changelog, 
changelogOffsetOfRunningTask)));
+        final Map<TopicPartition, Long> changelogOffsets = mkMap(
+            mkEntry(t1p0changelog, changelogOffsetOfRunningTask)
+        );
+        
when(runningStatefulTask.changelogOffsets()).thenReturn(changelogOffsets);
         final TasksRegistry tasks = mock(TasksRegistry.class);
-        final TaskManager taskManager = 
setUpTaskManagerWithoutStateUpdater(ProcessingMode.AT_LEAST_ONCE, tasks, false);
-        when(tasks.allTasksPerId()).thenReturn(mkMap(mkEntry(taskId00, 
runningStatefulTask)));
+        final TaskManager taskManager = 
setUpTaskManagerWithStateUpdater(ProcessingMode.AT_LEAST_ONCE, tasks);
+        when(stateUpdater.tasks()).thenReturn(Set.of(runningStatefulTask));

Review Comment:
   done in 07cdee0



-- 
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: [email protected]

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

Reply via email to