cadonna commented on code in PR #12562:
URL: https://github.com/apache/kafka/pull/12562#discussion_r957102630


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/DefaultStateUpdaterTest.java:
##########
@@ -125,6 +125,80 @@ public void shouldShutdownStateUpdaterAndRestart() {
         verify(changelogReader, times(2)).clear();
     }
 
+    @Test
+    public void shouldRemoveTasksFromAndClearInputQueueOnShutdown() throws 
Exception {
+        stateUpdater.shutdown(Duration.ofMinutes(1));

Review Comment:
   That is basically just a safe guard in case somebody modifies the test setup 
in the future. For example, if somebody starts the state updater in a `setup()` 
method. This shutdown ensures that we have a clean and not-started state 
updater for this test. 
   
   In `shouldRemoveUpdatingTasksOnShutdown()` it ensures that we shutdown the 
state updater created on line 89 before we re-create it with a very high commit 
interval so that we can be sure that the checkpoint that is created was created 
by the clean-up code and not during normal state updating. 



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