jsancio commented on code in PR #13845:
URL: https://github.com/apache/kafka/pull/13845#discussion_r1227012368


##########
raft/src/test/java/org/apache/kafka/raft/KafkaRaftClientSnapshotTest.java:
##########
@@ -303,7 +303,53 @@ public void testFetchRequestOffsetLessThanLogStart() 
throws Exception {
         context.client.poll();
 
         // Send Fetch request less than start offset
-        context.deliverRequest(context.fetchRequest(epoch, otherNodeId, 0, 
epoch, 0));
+        context.deliverRequest(context.fetchRequest(epoch, otherNodeId, 
snapshotId.offset() - 2, snapshotId.epoch(), 0));
+        context.pollUntilResponse();
+        FetchResponseData.PartitionData partitionResponse = 
context.assertSentFetchPartitionResponse();
+        assertEquals(Errors.NONE, 
Errors.forCode(partitionResponse.errorCode()));
+        assertEquals(epoch, partitionResponse.currentLeader().leaderEpoch());
+        assertEquals(localId, partitionResponse.currentLeader().leaderId());
+        assertEquals(snapshotId.epoch(), 
partitionResponse.snapshotId().epoch());
+        assertEquals(snapshotId.offset(), 
partitionResponse.snapshotId().endOffset());
+    }
+
+    @Test
+    public void testFetchRequestOffsetAtZero() throws Exception {

Review Comment:
   This test fails against `trunk`.



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