bbejeck commented on code in PR #18953:
URL: https://github.com/apache/kafka/pull/18953#discussion_r2017220549
##########
streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/KafkaStreamsTelemetryIntegrationTest.java:
##########
@@ -496,16 +483,20 @@ private void addGlobalStore(final StreamsBuilder builder)
{
() -> new Processor<>() {
private KeyValueStore<String, String> store;
+ // The store iterator is intentionally not closed here as
it needs
+ // to be open during the test, so the Streams app will
emit the
+ //
org.apache.kafka.stream.state.oldest.iterator.open.since.ms metric
+ // that is expected. So the globalStoreIterator is a
global variable
+ // (pun not intended), so it can be closed in the tearDown
method.
@Override
public void init(final ProcessorContext<Void, Void>
context) {
store = context.getStateStore("iq-test-store");
+ globalStoreIterator = store.all();
}
@Override
public void process(final Record<String, String> record) {
store.put(record.key(), record.value());
Review Comment:
without this the test fails, we need it open to get the iterator metrics
--
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]