bbejeck commented on code in PR #21120:
URL: https://github.com/apache/kafka/pull/21120#discussion_r2608149296
##########
streams/src/test/java/org/apache/kafka/streams/state/internals/MeteredSessionStoreTest.java:
##########
@@ -733,14 +733,14 @@ public void shouldTrackOldestOpenIteratorTimestamp() {
}
// now that the first iterator is closed, check that the timestamp
has advanced to the still open second iterator
- assertThat((Long) oldestIteratorTimestampMetric.metricValue(),
equalTo(secondTimestamp));
+ assertThat(oldestIteratorTimestampMetric.metricValue(),
equalTo(secondTimestamp));
} finally {
if (second != null) {
second.close();
}
}
- assertThat((Integer) oldestIteratorTimestampMetric.metricValue(),
nullValue());
+ assertThat(oldestIteratorTimestampMetric.metricValue(), equalTo(0L));
}
Review Comment:
Same here
##########
streams/src/test/java/org/apache/kafka/streams/state/internals/MeteredWindowStoreTest.java:
##########
@@ -517,14 +517,14 @@ public void shouldTrackOldestOpenIteratorTimestamp() {
}
// now that the first iterator is closed, check that the timestamp
has advanced to the still open second iterator
- assertThat((Long) oldestIteratorTimestampMetric.metricValue(),
equalTo(secondTimestamp));
+ assertThat(oldestIteratorTimestampMetric.metricValue(),
equalTo(secondTimestamp));
} finally {
if (second != null) {
second.close();
}
}
- assertThat((Integer) oldestIteratorTimestampMetric.metricValue(),
nullValue());
+ assertThat(oldestIteratorTimestampMetric.metricValue(), equalTo(0L));
}
Review Comment:
Again removed unnecessary cast
##########
streams/src/test/java/org/apache/kafka/streams/state/internals/MeteredKeyValueStoreTest.java:
##########
@@ -546,14 +548,14 @@ public void shouldTrackOldestOpenIteratorTimestamp() {
}
// now that the first iterator is closed, check that the timestamp
has advanced to the still open second iterator
- assertThat((Long) oldestIteratorTimestampMetric.metricValue(),
equalTo(secondTimestamp));
+ assertThat(oldestIteratorTimestampMetric.metricValue(),
equalTo(secondTimestamp));
} finally {
if (second != null) {
second.close();
}
}
// no open iterators left, timestamp should be reset to 0
- assertThat((Long) oldestIteratorTimestampMetric.metricValue(),
equalTo(0L));
+ assertThat(oldestIteratorTimestampMetric.metricValue(), equalTo(0L));
Review Comment:
Removed cast to `Long` here and above, not needed
--
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]