TaiJuWu commented on code in PR #17991:
URL: https://github.com/apache/kafka/pull/17991#discussion_r1865155083


##########
clients/src/test/java/org/apache/kafka/test/TestUtils.java:
##########
@@ -563,7 +563,7 @@ public static <T extends Throwable> void assertFutureThrows(
         String expectedMessage
     ) {
         T receivedException = assertFutureThrows(future, 
expectedCauseClassApiException);
-        assertEquals(expectedMessage, receivedException.getMessage());
+        assertTrue(receivedException.getMessage().contains(expectedMessage));

Review Comment:
   In gerenal, I perfer to explicit message since we may use simple error 
message when developing.
   Here is a example, 
https://github.com/apache/kafka/pull/17954/commits/0bf1c9be0a0f2094a09ef7f56528ac582257ab58#r1860502292.
   
   If we use `contains`, the error will be hidden. WDYT?



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