jolshan commented on a change in pull request #9626: URL: https://github.com/apache/kafka/pull/9626#discussion_r540354106
########## File path: core/src/test/scala/unit/kafka/controller/ControllerChannelManagerTest.scala ########## @@ -87,7 +90,10 @@ class ControllerChannelManagerTest { val LeaderAndIsrResponseReceived(leaderAndIsrResponse, brokerId) = batch.sentEvents.head assertEquals(2, brokerId) assertEquals(partitions.keySet, - leaderAndIsrResponse.partitions.asScala.map(p => new TopicPartition(p.topicName, p.partitionIndex)).toSet) + leaderAndIsrResponse.topics.asScala.map(t => t.partitionErrors.asScala.map(p => + new TopicPartition(topicNames.get(t.topicId).get, p.partitionIndex))).flatMap(f => f).toSet) Review comment: I thought I removed most of the get(topic).gets, but I guess I missed a few. Thanks for catching. And I agree about flatMap as well. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org