IgnacioAcunaF commented on a change in pull request #10883: URL: https://github.com/apache/kafka/pull/10883#discussion_r651993936
########## File path: core/src/main/scala/kafka/tools/TestRaftServer.scala ########## @@ -238,6 +238,8 @@ class TestRaftServer( reader.close() case Shutdown => // Ignore shutdown command + + case _ => // Ignore other events (such as null) Review comment: Exactly. When when eventQueue hits the eventTimeoutMs the `null` value arises (as there is nothing to poll from). When debugging encounter that `eventTimeoutMs ` could be 0 (if the throttleTimeMs is equal to 0), so if there is no inmediate events on the eventQueue, the `null` arises inmediatly, and as it is not caught, the thread stops. And yes, at the beggining I approached it with a `case null => // Ignore null event`, which made the class run just fine, but decided to let it generic to catch some events that may be being overlooked. Thinking of it know seems better to just let the case null, because otherwise it would made more difficult to debug further situations (non mapped events for example) -- 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