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



##########
File path: core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala
##########
@@ -3569,12 +3576,13 @@ class ReplicaManagerTest {
       assertEquals(0, 
replicaManager.replicaAlterLogDirsManager.fetcherThreadMap.size)
       replicaManager.alterReplicaLogDirs(Map(topicPartition -> 
newReplicaFolder.getAbsolutePath))
 
-      assertFetcherHasTopicId(replicaManager.replicaAlterLogDirsManager, 
partition.topicPartition, topicIdOpt)
-
       // Make sure the future log is created.
       replicaManager.futureLocalLogOrException(topicPartition)
       assertEquals(1, 
replicaManager.replicaAlterLogDirsManager.fetcherThreadMap.size)
 
+      // Verify that the fetcher has the correct topic id.
+      assertFetcherHasTopicId(replicaManager.replicaAlterLogDirsManager, 
partition.topicPartition, topicIdOpt)

Review comment:
       That's right. The goal is to verify that the topicid is correctly 
propagated to the fetcher state. Now that I think about it a bit more, we might 
be able to achieve the same by mocking the `ReplicaAlterLogDirsManager`. Let me 
give it a try.




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