hanyuzheng7 commented on code in PR #14570:
URL: https://github.com/apache/kafka/pull/14570#discussion_r1378458667


##########
streams/src/test/java/org/apache/kafka/streams/integration/IQv2StoreIntegrationTest.java:
##########
@@ -782,14 +784,15 @@ public void verifyStore() {
                 final String kind = this.kind;
                 if (storeToTest.keyValue()) {
                     if (storeToTest.timestamped()) {
-                        final Function<ValueAndTimestamp<Integer>, Integer> 
valueExtractor =
-                            ValueAndTimestamp::value;
-                        shouldHandleKeyQuery(2, valueExtractor, 5);
-                        shouldHandleRangeQueries(valueExtractor);
+                        shouldHandleKeyQuery(2,  5);
+                        shouldHandleTimestampedKeyQuery(2, 5);
+                        shouldHandleRangeQueries();
+                        shouldHandleTimestampedRangeQueries();
                     } else {
-                        final Function<Integer, Integer> valueExtractor = 
Function.identity();
-                        shouldHandleKeyQuery(2, valueExtractor, 5);
-                        shouldHandleRangeQueries(valueExtractor);
+                        shouldHandleKeyQuery(2, 5);
+                        shouldHandleRangeQueries();
+//                        shouldHandleTimestampedKeyQuery(2, 5);
+//                        shouldHandleTimestampedRangeQueries();

Review Comment:
   We've decided not to include tests for 
`shouldHandleTimestampedRangeQueries()` and `shouldHandleTimestampedKeyQuery(2, 
5)` in this PR. 
   
   The rationale for excluding the test for 
`shouldHandleTimestampedRangeQueries()` is that if a failure occurs, the code 
throws an` AssertionError`, which inevitably leads to a failed test, regardless 
of the correctness of the underlying logic.
   
   Similarly,` shouldHandleTimestampedKeyQuery(2, 5)` is theoretically 
equivalent to `shouldHandleTimestampedRangeQueries()`. However, it exhibits a 
discrepancy because `queryResult` is null, and as per the existing code, it 
should ideally provide an error-containing `queryResult` instead of null. 
   
   Consequently, even if the logic is accurate, the thrown exception prevents 
the test suite from passing completely.
   
   So, we can solve this problem in this ticket 
https://issues.apache.org/jira/browse/KAFKA-15768
   
                   



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