dimitarndimitrov commented on code in PR #17221:
URL: https://github.com/apache/kafka/pull/17221#discussion_r1778573710


##########
coordinator-common/src/test/java/org/apache/kafka/coordinator/common/runtime/HdrHistogramTest.java:
##########
@@ -172,4 +178,39 @@ public void testHistogramDataReset() {
         assertEquals(numEventsInFirstCycle, hdrHistogram.count(now + 
maxSnapshotAgeMs));
         assertEquals(numEventsInSecondCycle, hdrHistogram.count(now + 1 + 
maxSnapshotAgeMs));
     }
+
+    @Test
+    public void testLatestHistogramRace() throws InterruptedException, 
ExecutionException {

Review Comment:
   I'm not sure it's preferable. We don't ensure somehow that 
`latestHistogram()` will not return unfilled histogram - if there are no 
recordings, the histogram snapshot will be empty. I think this tests 
specifically threads racing to call `latestHistogram()`, so the current name 
seems well-fitting to me.



-- 
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

Reply via email to