jsancio commented on a change in pull request #10085: URL: https://github.com/apache/kafka/pull/10085#discussion_r623368881
########## File path: raft/src/test/java/org/apache/kafka/raft/RaftClientTestContext.java ########## @@ -1081,24 +1103,25 @@ OptionalInt currentClaimedEpoch() { .orElse(null); } - @Override - public void handleClaim(int epoch) { - // We record the next expected offset as the claimed epoch's start - // offset. This is useful to verify that the `handleClaim` callback - // was not received early. - long claimedEpochStartOffset = lastCommitOffset().isPresent() ? - lastCommitOffset().getAsLong() + 1 : 0L; - this.currentClaimedEpoch = OptionalInt.of(epoch); - this.claimedEpochStartOffsets.put(epoch, claimedEpochStartOffset); + Optional<SnapshotReader<String>> takeSnapshot() { Review comment: Yep. Changed the name as suggested. The name was inspired that a naming pattern used in Rust (https://doc.rust-lang.org/std/option/enum.Option.html#method.take) but I see that we use `takeSnapshot` in other parts of Kafka for creating snapshots. -- 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