dajac commented on a change in pull request #11942:
URL: https://github.com/apache/kafka/pull/11942#discussion_r835027340



##########
File path: core/src/test/scala/integration/kafka/server/DelayedFetchTest.scala
##########
@@ -166,6 +171,34 @@ class DelayedFetchTest {
     assertTrue(fetchResultOpt.isDefined)
   }
 
+
+  @Test
+  def testHasPreferredReadReplica(): Unit = {

Review comment:
       It seems that we don't really test the changes made in 
`ReplicaManager.fetchMessages` method here, isn't it? Overall, I think that the 
unit test should be in `ReplicaManagerTest` and it should ensure that a fetch 
does not go to the fetch purgatory if it has a preferred read replica. We might 
consider update `testPreferredReplicaAsLeader` directly. That test actually 
works because it fetches with min bytes equals to zero. If we change this to 1, 
it fails right away.




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