abbccdda commented on a change in pull request #10211:
URL: https://github.com/apache/kafka/pull/10211#discussion_r587832660



##########
File path: 
streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java
##########
@@ -3112,6 +3122,26 @@ void setChangelogOffsets(final Map<TopicPartition, Long> 
changelogOffsets) {
             return changelogOffsets;
         }
 
+        @Override
+        public Map<TopicPartition, Long> committedOffsets() {
+            return Collections.emptyMap();
+        }
+
+        @Override
+        public Map<TopicPartition, Long> highWaterMark() {
+            return Collections.emptyMap();
+        }
+
+        @Override
+        public Optional<Long> timeCurrentIdlingStarted() {
+            return Optional.empty();
+        }
+
+        @Override
+        public void updateCommittedOffsets(final TopicPartition 
topicPartition, final Long offset) {

Review comment:
       Could we add a test case for `updateCommittedOffsets`?

##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java
##########
@@ -266,13 +272,13 @@ public void suspend() {
             case CREATED:
                 log.info("Suspended created");
                 transitionTo(State.SUSPENDED);
-
+                setTimeCurrentIdlingStarted();

Review comment:
       Actually I mean getting a helper like:
   ```
   void transitToSuspend() {
     log.info("Suspended {}", state()); 
     transitionTo(State.SUSPENDED);
     timeCurrentIdlingStarted = Optional.of(System.currentTimeMillis());
   }
   ```
   since the operation is the same for all 3 transition calls




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

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


Reply via email to