leaf-soba commented on code in PR #18816: URL: https://github.com/apache/kafka/pull/18816#discussion_r2036379689
########## streams/src/test/java/org/apache/kafka/streams/state/internals/ChangeLoggingKeyValueBytesStoreTest.java: ########## @@ -89,8 +95,81 @@ public class ChangeLoggingKeyValueBytesStoreTest { public void before() { context = mockContext(); context.setTime(0); + store = new ChangeLoggingKeyValueBytesStore(innerMock); store.init(context, store); } + private void mockPosition() { + when(innerMock.getPosition()).thenReturn(Position.emptyPosition()); + } + private void mockGet(final Map<Bytes, byte[]> mockMap) { Review Comment: Thanks for pointing that out! We're using mockMap here to simulate the internal state of the underlying store, since the tests in CachingInMemoryKeyValueStoreTest are being streamlined to rely on a mocked underlyingStore as per the KIP-614 review discussion. Because innerMock is a mock and doesn’t retain state on its own, we use mockMap to mimic how the real store would behave across multiple interactions — especially for verifying behavior like reads after writes. This lets us preserve the semantics of the store while still keeping the actual store mocked, as requested. That said, I'm open to simplifying it further if there's a cleaner way to preserve the same test coverage and behavior expectations. https://issues.apache.org/jira/browse/KAFKA-10789 -- 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