philipnee commented on code in PR #15525:
URL: https://github.com/apache/kafka/pull/15525#discussion_r1535038917
##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/OffsetsRequestManagerTest.java:
##########
@@ -131,13 +131,11 @@ public void testListOffsetsRequest_Success() throws
ExecutionException, Interrup
ListOffsetsRequest.EARLIEST_TIMESTAMP);
mockSuccessfulRequest(Collections.singletonMap(TEST_PARTITION_1,
LEADER_1));
- CompletableFuture<Map<TopicPartition, OffsetAndTimestamp>> result =
requestManager.fetchOffsets(
- timestampsToSearch,
- false);
+ CompletableFuture<Map<TopicPartition, Long>> result =
requestManager.beginningOrEndOffset(timestampsToSearch);
assertEquals(1, requestManager.requestsToSend());
assertEquals(0, requestManager.requestsToRetry());
- Map<TopicPartition, OffsetAndTimestamp> expectedOffsets =
Collections.singletonMap(TEST_PARTITION_1, new OffsetAndTimestamp(5L, 1L));
+ Map<TopicPartition, Long> expectedOffsets =
Collections.singletonMap(TEST_PARTITION_1, 5L);
Review Comment:
Note: A lot of mock results are converted to Long because most tests have
the `requireTimestamps` field marked false, which implies they are only
invoking beginningOrEndOffsets
--
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]