Description
I often see the following exception while running some tests
(ProducerFailureHandlingTest.testNoResponse is one such instance):
[2015-01-19 22:30:24,257] ERROR [Controller-0-to-broker-1-send-thread], Controller 0 fails to send a request to broker id:1,host:localhost,port:56729 (kafka.controller.RequestSendThread:103) java.lang.NullPointerException at kafka.controller.RequestSendThread.doWork(ControllerChannelManager. scala:150) at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:60)
Looking at that code in question, I can see that the NPE can be triggered
when the "receive" is null which can happen if the "isRunning" is false
(i.e a shutdown has been requested).