jolshan commented on code in PR #13230: URL: https://github.com/apache/kafka/pull/13230#discussion_r1103129876
########## core/src/test/scala/unit/kafka/server/AbstractFetcherThreadTest.scala: ########## @@ -1387,13 +1466,8 @@ class AbstractFetcherThreadTest { val state = replicaPartitionState(topicPartition) if (leader.isTruncationOnFetchSupported && FetchResponse.isDivergingEpoch(partitionData)) { - val divergingEpoch = partitionData.divergingEpoch - truncateOnFetchResponse(Map(topicPartition -> new EpochEndOffset() - .setPartition(topicPartition.partition) - .setErrorCode(Errors.NONE.code) - .setLeaderEpoch(divergingEpoch.epoch) - .setEndOffset(divergingEpoch.endOffset))) - return None + throw new IllegalStateException("processPartitionData should not be called for a partition with " + Review Comment: Is this called anywhere in tests where we would throw the error? If not, it's interesting that this was implemented and never used. -- 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