cadonna commented on a change in pull request #11462: URL: https://github.com/apache/kafka/pull/11462#discussion_r741926434
########## File path: streams/src/test/java/org/apache/kafka/streams/state/internals/metrics/RocksDBMetricsRecorderTest.java ########## @@ -557,10 +555,10 @@ public void shouldNotRecordStatisticsBasedMetricsIfStatisticsIsNull() { @Test public void shouldCorrectlyHandleHitRatioRecordingsWithZeroHitsAndMisses() { - resetToNice(statisticsToAdd1); + reset(statisticsToAdd1); recorder.addValueProviders(SEGMENT_STORE_NAME_1, dbToAdd1, cacheToAdd1, statisticsToAdd1); expect(statisticsToAdd1.getHistogramData(anyObject())).andStubReturn(new HistogramData(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0L, 0L, 0.0)); - expect(statisticsToAdd1.getTickerCount(anyObject())).andStubReturn(0L); Review comment: `getTickerCount()` is never called in production code. You can comment out this line and the test will still be successful. This is because the mock is specified to be nice. ########## File path: streams/src/test/java/org/apache/kafka/streams/state/internals/metrics/RocksDBMetricsRecorderTest.java ########## @@ -557,10 +555,10 @@ public void shouldNotRecordStatisticsBasedMetricsIfStatisticsIsNull() { @Test public void shouldCorrectlyHandleHitRatioRecordingsWithZeroHitsAndMisses() { - resetToNice(statisticsToAdd1); + reset(statisticsToAdd1); recorder.addValueProviders(SEGMENT_STORE_NAME_1, dbToAdd1, cacheToAdd1, statisticsToAdd1); expect(statisticsToAdd1.getHistogramData(anyObject())).andStubReturn(new HistogramData(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0L, 0L, 0.0)); - expect(statisticsToAdd1.getTickerCount(anyObject())).andStubReturn(0L); Review comment: `getTickerCount()` is never called in production code. You can comment out this line and the test will still be successful. This is because the mock is specified to be nice. -- 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