ijuma commented on a change in pull request #9874:
URL: https://github.com/apache/kafka/pull/9874#discussion_r556657992



##########
File path: 
clients/src/test/java/org/apache/kafka/common/security/authenticator/SaslAuthenticatorTest.java
##########
@@ -1550,13 +1549,8 @@ public void 
testCannotReauthenticateWithDifferentPrincipal() throws Exception {
          * original token with a new one.
          */
         delay(1000L);
-        try {
-            checkClientConnection(node);
-            fail("Re-authentication with a different principal should have 
failed but did not");
-        } catch (AssertionError e) {
-            // ignore, expected
-            server.verifyReauthenticationMetrics(0, 1);
-        }
+        assertThrows(AssertionFailedError.class, () -> 
checkClientConnection(node));

Review comment:
       We can file a JIRA if you think this can be improved. We didn't change 
that here, right?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to