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 which used to be null as we would only register when
there was at least one open iterator. This is why it's a null check here. We
return where there are no open iterators but the is still present.
--
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]