kamalcph commented on code in PR #15885: URL: https://github.com/apache/kafka/pull/15885#discussion_r1597563897
########## storage/src/main/java/org/apache/kafka/server/log/remote/metadata/storage/ConsumerTask.java: ########## @@ -153,6 +173,7 @@ public void run() { private void processConsumerRecord(ConsumerRecord<byte[], byte[]> record) { final RemoteLogMetadata remoteLogMetadata = serde.deserialize(record.value()); + onConsume.accept(remoteLogMetadata); Review Comment: This is not the correct way to capture the events. Assume that the testcase don't want to process an event (`shouldProcess` check returns false). We don't want that event to be captured. Instead, we can have a setter method for `RemotePartitionMetadataStore` and pass a custom implementation similar to [DummyEventHandler](https://github.com/apache/kafka/blob/trunk/storage/src/test/java/org/apache/kafka/server/log/remote/metadata/storage/ConsumerTaskTest.java#L374) where we can capture the event and delegate it to the real implementation. -- 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