hanyuzheng7 commented on code in PR #14570:
URL: https://github.com/apache/kafka/pull/14570#discussion_r1399656268
##########
streams/src/test/java/org/apache/kafka/streams/integration/IQv2StoreIntegrationTest.java:
##########
@@ -1632,10 +1729,65 @@ public <V> void shouldHandleRangeQuery(
IllegalArgumentException.class,
queryResult.get(partition)::getFailureMessage
);
-
try (final KeyValueIterator<Integer, V> iterator =
queryResult.get(partition).getResult()) {
while (iterator.hasNext()) {
-
actualValues.add(valueExtactor.apply(iterator.next().value));
+ actualValues.add((Integer) iterator.next().value);
+ }
+ }
+ assertThat(queryResult.get(partition).getExecutionInfo(),
is(empty()));
+ }
+ assertThat("Result:" + result, actualValues, is(expectedValues));
+ assertThat("Result:" + result, result.getPosition(),
is(INPUT_POSITION));
+ }
+ }
+
+ public <V> void shouldHandleTimestampedRangeQuery(
+ final Optional<Integer> lower,
+ final Optional<Integer> upper,
+ final boolean isKeyAscending,
+ final List<Integer> expectedValues) {
Review Comment:
It seem every time the timestamp of ` ValueAndTimestamp` is change, so we
cannot compare ` ValueAndTimestamp`.
##########
streams/src/test/java/org/apache/kafka/streams/integration/IQv2StoreIntegrationTest.java:
##########
@@ -1632,10 +1729,65 @@ public <V> void shouldHandleRangeQuery(
IllegalArgumentException.class,
queryResult.get(partition)::getFailureMessage
);
-
try (final KeyValueIterator<Integer, V> iterator =
queryResult.get(partition).getResult()) {
while (iterator.hasNext()) {
-
actualValues.add(valueExtactor.apply(iterator.next().value));
+ actualValues.add((Integer) iterator.next().value);
+ }
+ }
+ assertThat(queryResult.get(partition).getExecutionInfo(),
is(empty()));
+ }
+ assertThat("Result:" + result, actualValues, is(expectedValues));
+ assertThat("Result:" + result, result.getPosition(),
is(INPUT_POSITION));
+ }
+ }
+
+ public <V> void shouldHandleTimestampedRangeQuery(
+ final Optional<Integer> lower,
+ final Optional<Integer> upper,
+ final boolean isKeyAscending,
+ final List<Integer> expectedValues) {
Review Comment:
It seems every time the timestamp of ` ValueAndTimestamp` is change, so we
cannot compare ` ValueAndTimestamp`.
--
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]