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


##########
streams/src/test/java/org/apache/kafka/streams/state/internals/TimestampedKeyValueStoreBuilderWithHeadersTest.java:
##########
@@ -682,10 +657,16 @@ public void 
shouldHandleKeyQueryOnAdaptedTimestampedStore() {
             final QueryResult<byte[]> result = wrapped.query(query, 
positionBound, config);
 
             // Verify: Adapter delegates to RocksDBTimestampedStore which 
supports IQv2 through RocksDBStore
-            // The underlying store should handle the query successfully (even 
if key doesn't exist)
-            assertTrue(result.isSuccess() || result.getFailureReason() != 
FailureReason.UNKNOWN_QUERY_TYPE,
-                    "Expected query to be handled (not UNKNOWN_QUERY_TYPE), 
since RocksDBTimestampedStore supports IQv2");
+            assertTrue(result.isSuccess(),
+                    "Expected query to succeed since RocksDBTimestampedStore 
supports IQv2");
             assertNotNull(result.getPosition(), "Expected position to be set");
+
+            // Verify deserialized data
+            final ValueTimestampHeaders<String> deserialized = 
store.get("test-key");

Review Comment:
   Same comment as above.



##########
streams/src/test/java/org/apache/kafka/streams/state/internals/TimestampedKeyValueStoreBuilderWithHeadersTest.java:
##########


Review Comment:
   The idea to add data to the store implies that we verify `result` -- it 
should give us the `ValueTimestampHeaders` back, that we put into the store.
   
   What make me wonder why we actually "unwrap" and query the lower layer 
directly? Why not query through the MeteredStore, and we don't have to deal 
with `byte[]` arrays?
   
   Below you verify with `store.get()` but this does check if the data is in 
the store, it does not check if `result` is as expected, and we want to verify 
IQv2, right?



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

Reply via email to