kirktrue edited a comment on pull request #10980:
URL: https://github.com/apache/kafka/pull/10980#issuecomment-887635572


   > Why is `NetworkClient#send` throwing an exception? It shouldn't be doing 
that, right? Can you explain more about the problem that this PR fixes?
   
   Per [the original issue](https://issues.apache.org/jira/browse/KAFKA-12989) 
the `MockClient` used for testing allows for fault injection via the 
`RequestMatcher`. If the test sets up the condition where the request _doesn't_ 
match some condition, the `MockClient.send` method is supposed to throw an 
`IllegalStateException`.
   
   That change seemed straightforward except that this now caused problems in 
`KafkaAdminClient`. Because it's not expecting any errors, this exception 
causes the thread in `KafkaAdminClient.sendEligibleCalls` that is servicing 
requests to die, hence my addition of the `try`/`catch` wrapper.
   
   That said, I'm not 100% confident that this change is the right way to 
handle things. Please advise.
   
   Thanks!


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to