aliehsaeedii commented on code in PR #17209:
URL: https://github.com/apache/kafka/pull/17209#discussion_r1773147020
##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java:
##########
@@ -1247,6 +1248,36 @@ public void
shouldRetryInitializationWhenLockExceptionInStateUpdater() {
verify(stateUpdater).add(task01);
}
+ @SuppressWarnings("unchecked")
+ @Test
+ public void shouldRetryInitializationWhenCanNotInitializeTask() {
+ final StreamTask task00 = statefulTask(taskId00,
taskId00ChangelogPartitions)
+ .withInputPartitions(taskId00Partitions)
+ .inState(State.RESTORING).build();
+ final StandbyTask task01 = standbyTask(taskId01,
taskId01ChangelogPartitions)
+ .withInputPartitions(taskId01Partitions)
+ .inState(State.RUNNING).build();
+ final TasksRegistry tasks = mock(TasksRegistry.class);
+ when(tasks.drainPendingTasksToInit()).thenReturn(mkSet(task00,
task01));
+ final TaskManager.BackoffRecord backoffRecord =
mock(TaskManager.BackoffRecord.class);
Review Comment:
Advancing `time` alone wont help since the backoff record corresponding to
task00 is not existing in the map.
--
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]