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/03/16 07:59:48 UTC

[GitHub] [kafka] dajac commented on a change in pull request #10323: KAFKA-12459; Use property testing library for raft event simulation tests

dajac commented on a change in pull request #10323:
URL: https://github.com/apache/kafka/pull/10323#discussion_r594933714



##########
File path: raft/src/test/java/org/apache/kafka/raft/RaftEventSimulationTest.java
##########
@@ -835,6 +734,16 @@ void poll() {
                 throw new RuntimeException("Uncaught exception during poll of node " + nodeId, e);
             }
         }
+
+        long highWatermark() {
+            Optional<LogOffsetMetadata> highWatermarkMetadata = client.quorum().highWatermark();
+            return highWatermarkMetadata.map(hw -> hw.offset).orElse(0L);

Review comment:
       nit: These two lines could be combined into one.




----------------------------------------------------------------
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:
users@infra.apache.org