kirktrue commented on code in PR #19622:
URL: https://github.com/apache/kafka/pull/19622#discussion_r2086875757


##########
clients/src/test/java/org/apache/kafka/common/security/oauthbearer/OAuthBearerValidatorCallbackHandlerTest.java:
##########
@@ -106,11 +109,13 @@ public OAuthBearerToken validate(String accessToken) 
throws ValidateException {
         OAuthBearerValidatorCallbackHandler handler = new 
OAuthBearerValidatorCallbackHandler();
 
         // An error initializing the JwtValidator should cause 
OAuthBearerValidatorCallbackHandler.init() to fail.
-        assertThrowsWithMessage(
+        KafkaException root = assertThrows(
             KafkaException.class,
-            () -> handler.init(verificationKeyResolver, jwtValidator),
-            "encountered an error when initializing"
+            () -> handler.init(verificationKeyResolver, jwtValidator)
         );
+        assertNotNull(root);

Review Comment:
   Removed the call to `assertNotNull()`.



-- 
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