lucasbru commented on code in PR #14437:
URL: https://github.com/apache/kafka/pull/14437#discussion_r1336770650
##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/DefaultStateUpdaterTest.java:
##########
@@ -1043,6 +1046,28 @@ public void shouldResumeActiveStatefulTask() throws
Exception {
verify(changelogReader, times(2)).enforceRestoreActive();
}
+ @Test
+ public void shouldAwaitWhenAllTasksPaused() throws Exception {
+ final StreamTask task = statefulTask(TASK_0_0,
mkSet(TOPIC_PARTITION_A_0)).inState(State.RESTORING).build();
+ stateUpdater.start();
+ stateUpdater.add(task);
+
+ when(topologyMetadata.isPaused(null)).thenReturn(true);
+
+ verifyPausedTasks(task);
+
+ reset(changelogReader);
Review Comment:
I don't think this is quite true. Paused tasks will not be added to
`updatingTasks`, but we may still go around the loop calling `restore` on a
potentially empty set. This is testing that after a while, we do not go around
the loop anymore. But it's actually not a good test, for the reason described
above.
--
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]