kevin-wu24 commented on code in PR #22111:
URL: https://github.com/apache/kafka/pull/22111#discussion_r3317576095
##########
raft/src/test/java/org/apache/kafka/raft/KafkaRaftClientFetchTest.java:
##########
@@ -765,4 +766,75 @@ void testUpdatedHighWatermarkCompleted() throws Exception {
assertEquals(localLogEndOffset, partitionResponse.highWatermark());
}
}
+
+ @Test
+ void testObserverFetchesBetweenLeaderAndBootstrapServers() throws
Exception {
Review Comment:
> Does this fail without your change? If so, can you tell me exactly what
fails?
Yes, `trunk` fails on L800 by sending a fetch request to the leader endpoint
instead of the bootstrap endpoint on the second iteration of the for loop. At
this point, the fetch timeout is expired (simulating being unable to reach the
leader), and the local node still tries to fetch from it, rather than trying to
fetch from bootstrap servers.
Looking at this again after a while, the for loop actually made this harder
for me to read. I'm going to remove it.
--
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]