lnbest0707-uber commented on code in PR #14170: URL: https://github.com/apache/pinot/pull/14170#discussion_r2054919563
########## pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/realtime/segment/SegmentFlushThresholdComputerTest.java: ########## @@ -302,4 +304,27 @@ public void testAdjustRowsToSizeRatio() { // (0.1 * 0.25) + (0.9 * 0.15) assertEquals(computer.getLatestSegmentRowsToSizeRatio(), 0.16); } + + @Test(invocationCount = 1000) + public void testSegmentFlushThresholdVariance() { + SegmentFlushThresholdComputer computer = new SegmentFlushThresholdComputer(); + int threshold = 90000; + for (double var = 0; var <= 0.5; var += 0.05) { + StreamConfig streamConfig = mock(StreamConfig.class); + when(streamConfig.getFlushThresholdSegmentSizeBytes()).thenReturn(200_0000L); + when(streamConfig.getStreamConfigsMap()).thenReturn( + Map.of("realtime.segment.flush.threshold.variance.percentage", String.valueOf(var))); Review Comment: This is a no-op test. The filled the value is always "0" because we are using `percentage` here but the code is reading `fraction` -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org