soarez commented on code in PR #14903: URL: https://github.com/apache/kafka/pull/14903#discussion_r1414728861
########## core/src/test/scala/unit/kafka/server/BrokerLifecycleManagerTest.scala: ########## @@ -197,11 +197,14 @@ class BrokerLifecycleManagerTest { result } - def poll[T](context: RegistrationTestContext, manager: BrokerLifecycleManager, future: Future[T]): T = { - while (!future.isDone || context.mockClient.hasInFlightRequests) { - context.poll() + def poll[T](ctx: RegistrationTestContext, manager: BrokerLifecycleManager, future: Future[T]): T = { + while (ctx.mockChannelManager.unsentQueue.isEmpty) { + if (manager.eventQueue.isEmpty) Review Comment: You're right, this is incorrect. We must only advance the time if the eventQueue has an event scheduled at a future time, unless the next event is a timeout event. -- 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