hachikuji commented on code in PR #12174:
URL: https://github.com/apache/kafka/pull/12174#discussion_r875182105


##########
core/src/main/scala/kafka/server/BrokerLifecycleManager.scala:
##########
@@ -431,8 +431,18 @@ class BrokerLifecycleManager(val config: KafkaConfig,
     }
 
     override def onTimeout(): Unit = {
-      info("Unable to send a heartbeat because the RPC got timed out before it 
could be sent.")
-      scheduleNextCommunicationAfterFailure()
+      if (_state == BrokerState.PENDING_CONTROLLED_SHUTDOWN) {

Review Comment:
   I think one way we can fix this test is to let `KafkaBroker.shutdown` accept 
a timeout parameter. Possibly we could overload it like this:
   ```
   def shutdown(timeoutMs: Long)
   def shutdown() = shutdown(5000)
   ```
   Then we can change the test to just wait a couple seconds. What do you think?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to