ijuma commented on a change in pull request #8705: URL: https://github.com/apache/kafka/pull/8705#discussion_r432209283
########## File path: core/src/test/scala/unit/kafka/network/SocketServerTest.scala ########## @@ -1886,19 +1926,13 @@ class SocketServerTest { super.channels.forEach(allChannels += _.id) allDisconnectedChannels ++= super.disconnected.asScala.keys - val completedReceivesMap: util.Map[String, NetworkReceive] = JTestUtils.fieldValue(this, classOf[Selector], "completedReceives") - def addToCompletedReceives(receive: NetworkReceive): Unit = { - val channelOpt = Option(super.channel(receive.source)).orElse(Option(super.closingChannel(receive.source))) - channelOpt.foreach { channel => completedReceivesMap.put(channel.id, receive) } - } - // For each result type (completedReceives/completedSends/disconnected), defer the result to a subsequent poll() // if `minPerPoll` results are not yet available. When sufficient results are available, all available results // including previously deferred results are returned. This allows tests to process `minPerPoll` elements as the // results of a single poll iteration. Review comment: I think your refactoring has added the comments to other places. Maybe we can add "This allows tests to process `minPerPoll` elements as the results of a single poll iteration" to the `update` method and remove this? ---------------------------------------------------------------- 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