chia7712 commented on PR #16285:
URL: https://github.com/apache/kafka/pull/16285#issuecomment-2161353384

   > Remove unnecessary try/catch for admin calls for tests that should fail 
when exception is thrown.
   
   There are some `fail` asserts used in lambda function. Maybe we can replace 
lambda foreach by loop to propagate the exception. Also, the following code can 
be rewrite by `assertThrows(Exception.class, () -> resultData.get(u).get())`
   ```java
                   try {
                       resultData.get(u).get();
                       fail("Expected request for user " + u + " to complete 
exceptionally, but it did not");
                   } catch (Exception expected) {
                       // ignore
                   }
   ```


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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to