kafka tests sometimes shutdown gradle with non-zero code. The (one of) root cause is that InterBrokerSendThread#pollOnce encounters DisconnectException when NetworkClient is closing. DisconnectException should be viewed as "expected" error as we do close it. In other words, InterBrokerSendThread#pollOnce should swallow it.
- links to