mjsax commented on code in PR #18953:
URL: https://github.com/apache/kafka/pull/18953#discussion_r2015232961


##########
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:
   Seem we don't really need this? We never pipe any data anyway?



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

Reply via email to