dajac commented on issue #8509:
URL: https://github.com/apache/kafka/pull/8509#issuecomment-617137684


   @apovzner Yeah, you're right. It does not increase the overall coverage.
   
   I spent quite some time in the `KafkaApis` recently and I noticed that its 
unit test coverage is quite low. If not mistaken, we have literally zero unit 
tests for the `LeaderAndIsr` and `UpdateMetadata` requests over there. I 
believe that having a reasonable unit tests coverage will help us to catch 
regression earlier in the development process. When one touches the 
`KafkaApis`, the first reflex is to run its unit tests to verify that things 
are not broken. 
   
   I do agree that adding a test which verifies that `IllegalStateException` is 
not thrown does not bring much. What do you think about adding few unit tests 
which verify respectively that a stale broker epoch is rejected and a valid 
broker epoch is accepted for the `LeaderAndIsr`, the `StopReplica` and the 
`UpdateMetadata` requests?


----------------------------------------------------------------
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:
[email protected]


Reply via email to