You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/06/15 17:15:21 UTC

[GitHub] [kafka] IgnacioAcunaF commented on a change in pull request #10883: KAFKA-12949: TestRaftServer's scala.MatchError: null on test-kraft-server-start.sh

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 yes, at the beggining I approached it with a `case null => // Ignore null event`, which made the class run just fine, but let it generic to catch some events that may be being overlooked.




-- 
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:
users@infra.apache.org