squah-confluent commented on code in PR #20986:
URL: https://github.com/apache/kafka/pull/20986#discussion_r2558618361


##########
coordinator-common/src/test/java/org/apache/kafka/coordinator/common/runtime/HdrHistogramTest.java:
##########
@@ -216,10 +216,14 @@ public void testLatestHistogramRace() throws 
InterruptedException, ExecutionExce
 
     @Test
     public void testRecordLimit() {
+        long now = System.currentTimeMillis();
         long highestTrackableValue = 10L;
         HdrHistogram hdrHistogram = new HdrHistogram(10L, 
highestTrackableValue, 3);
 
         hdrHistogram.record(highestTrackableValue + 1000L);
-        assertEquals(highestTrackableValue, 
hdrHistogram.max(System.currentTimeMillis()));
+        assertEquals(highestTrackableValue, hdrHistogram.max(now));
+
+        hdrHistogram.record(-50L);
+        assertEquals(0, hdrHistogram.max(now + 1000L));

Review Comment:
   There's no histogram `min` method. We can add one, but it'd be only used in 
this one test.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to