You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/09/30 07:04:43 UTC

[GitHub] [kafka] showuon commented on a change in pull request #11362: KAFKA-13319: Do not commit empty offsets on producer

showuon commented on a change in pull request #11362:
URL: https://github.com/apache/kafka/pull/11362#discussion_r719115383



##########
File path: streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java
##########
@@ -735,7 +735,6 @@ public void shouldCommitNonCorruptedTasksOnTaskCorruptedException() {
         topologyBuilder.addSubscribedTopicsFromAssignment(anyObject(), anyString());
         expectLastCall().anyTimes();
         expectRestoreToBeCompleted(consumer, changeLogReader);
-        consumer.commitSync(eq(emptyMap()));

Review comment:
       Since we won't commit empty offsets now, I think we should add test for this improvement. So, I'm thinking, instead of removing this line, we should verify that the `commitSync(emptyMap)` is not called during this test.
   
   ```java
   consumer.commitSync(eq(emptyMap()));
   expectLastCall().andStubThrow(new AssertionError("should not invoke commitSync when offset map is empty"));
   ```
   What do you think?




-- 
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-unsubscribe@kafka.apache.org

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