stoty commented on code in PR #7955:
URL: https://github.com/apache/hadoop/pull/7955#discussion_r2349547116


##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java:
##########
@@ -345,6 +356,33 @@ public static void assertExceptionContains(String 
expectedText,
     }
   }
 
+  /**
+   * Assert that an exception's <code>toString()</code> value
+   * matches the pattern.
+   * @param pattern regex pattern to match
+   * @param t thrown exception
+   * @param message any extra text for the string
+   * @throws AssertionError if the expected string is not found
+   */
+  public static void assertExceptionMatches(Pattern pattern,
+      Throwable t,

Review Comment:
   Perhaps we can make the suggested changes on both the old and new method.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to