bbejeck commented on code in PR #21091:
URL: https://github.com/apache/kafka/pull/21091#discussion_r2607023708


##########
streams/src/test/java/org/apache/kafka/streams/state/internals/MeteredKeyValueStoreTest.java:
##########
@@ -527,16 +527,13 @@ public void shouldTrackOldestOpenIteratorTimestamp() {
         when(inner.all()).thenReturn(KeyValueIterators.emptyIterator());
         init();
 
-        KafkaMetric oldestIteratorTimestampMetric = 
metric("oldest-iterator-open-since-ms");
-        assertThat(oldestIteratorTimestampMetric, nullValue());
+        final KafkaMetric oldestIteratorTimestampMetric = 
metric("oldest-iterator-open-since-ms");
+        assertThat(oldestIteratorTimestampMetric, not(nullValue()));

Review Comment:
   The method returns the `KafkaMetric` which would be null as we used to not 
register the metric until we had one open iterator.  But given that we're going 
back to register on startup and deregister on close I think this method can be 
removed.



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