aliehsaeedii commented on code in PR #21971:
URL: https://github.com/apache/kafka/pull/21971#discussion_r3575010257
##########
streams/src/test/java/org/apache/kafka/streams/state/internals/MeteredTimestampedKeyValueStoreWithHeadersTest.java:
##########
@@ -697,4 +699,21 @@ public void
shouldUseHeadersFromValueToDeserializeKeyInPrefixScan() {
// The critical verification: key deserializer must have been called
with HEADERS (not empty headers)
verify(keyDeserializer).deserialize(any(), eq(HEADERS),
eq(KEY.getBytes()));
}
+
+ @Test
+ public void shouldUseHeadersFromContextForPrefixSerialization() {
Review Comment:
I agree with your point — we shouldn't add tests per underlying store, but
my concern wasn't about the underlying stores; it was about the outcome. Keys
are stored serialized with headers, and the bug was exactly that prefixScan
serialized the prefix without them, so the range didn't match the stored keys.
The mock test only asserts the plumbing (serializer called with headers, inner
called with the bytes) — it never proves that a header-dependent serde produces
a prefix range that actually matches the stored keys and returns the right
entries.
--
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]