bbejeck commented on code in PR #23984:
URL: https://github.com/apache/kafka/pull/23984#discussion_r4402121126


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/tasks/DefaultTaskExecutorTest.java:
##########
@@ -134,6 +134,20 @@ public void shouldUnassignTaskWhenNotProgressing() {
         assertNull(taskExecutor.currentTask());
     }
 
+    @Test
+    public void shouldUnassignTaskWhileProcessingPaused() {
+        when(taskManager.processingPaused()).thenReturn(true);
+

Review Comment:
   nit: `canPunctuateTask` isn't stubbed here, so the mock returns false and 
the punctuate branch is never entered, paused or not. That means the 
`never().maybePunctuateStreamTime()` / `never().maybePunctuateSystemTime()` 
checks pass even if the `!processingPaused` check on punctuation is removed.



##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java:
##########
@@ -1875,6 +1875,15 @@ public void signalTaskExecutors() {
         }
     }
 
+    /**
+     * Pause or resume processing and punctuation on the processing threads, 
if they are enabled.
+     */
+    void setProcessingThreadsPaused(final boolean paused) {

Review Comment:
   nit:  No test covers this forwarding. `StreamThreadTest` mocks 
`TaskManager`, so if this call became a no-op, every test would still pass



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