cadonna commented on code in PR #14317: URL: https://github.com/apache/kafka/pull/14317#discussion_r1315913915
########## streams/src/test/java/org/apache/kafka/streams/state/internals/metrics/RocksDBMetricsRecorderGaugesTest.java: ########## @@ -211,14 +215,19 @@ private void runAndVerifySumOfProperties(final String propertyName) throws Excep final long recordedValue1 = 5L; final long recordedValue2 = 3L; - when(dbToAdd1.getAggregatedLongProperty(ROCKSDB_PROPERTIES_PREFIX + propertyName)).thenReturn(recordedValue1); - when(dbToAdd2.getAggregatedLongProperty(ROCKSDB_PROPERTIES_PREFIX + propertyName)).thenReturn(recordedValue2); + if (aggregated) { + when(dbToAdd1.getAggregatedLongProperty(ROCKSDB_PROPERTIES_PREFIX + propertyName)).thenReturn(recordedValue1); + when(dbToAdd2.getAggregatedLongProperty(ROCKSDB_PROPERTIES_PREFIX + propertyName)).thenReturn(recordedValue2); + } else { + when(dbToAdd1.getLongProperty(ROCKSDB_PROPERTIES_PREFIX + propertyName)).thenReturn(recordedValue1); + when(dbToAdd2.getLongProperty(ROCKSDB_PROPERTIES_PREFIX + propertyName)).thenReturn(recordedValue2); + } Review Comment: I would move this part into `runAndVerifyBlockCacheMetricsWithMultipleCaches()`. Before we forwarded the call to this because the verifications were basically the same. That changed now, so I think it is cleaner to separate both. -- 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