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


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamThreadTest.java:
##########
@@ -2927,7 +2927,30 @@ void runOnce() {
 
     @Test
     public void shouldCheckStateUpdater() {
+        final StreamThread streamThread = 
setUpThreadWithStateUpdater(StreamsTestUtils.getStreamsConfig());
+        final TaskManager taskManager = streamThread.taskManager();
+        streamThread.setState(State.STARTING);
+
+        streamThread.runOnce();
+
+        Mockito.verify(taskManager).checkStateUpdater(Mockito.anyLong(), 
Mockito.any());
+        Mockito.verify(taskManager).process(Mockito.anyInt(), Mockito.any());
+    }
+
+    @Test
+    public void 
shouldRespectPollTimeInPartitionsAssignedStateWithStateUpdater() {

Review Comment:
   Could you also add tests for the other branches of the `if`-statement in 
`pollPhase()`?
   I propose to add the case `state == State.PARTITIONS_ASSIGNED && 
!stateUpdaterEnabled` in this PR and to add the other cases in a separate PR. 
   With other cases I mean:
   - `state == State.PARTITIONS_REVOKED`
   - `state == State.RUNNING`
   - `state == State.STARTING`
   - `state == State.PENDING_SHUTDOWN`



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to