sanpwc commented on code in PR #3092:
URL: https://github.com/apache/ignite-3/pull/3092#discussion_r1478032420


##########
modules/core/src/testFixtures/java/org/apache/ignite/internal/testframework/IgniteTestUtils.java:
##########
@@ -322,6 +326,35 @@ public static Throwable assertThrowsWithCause(
         throw new AssertionError("Exception has not been thrown.");
     }
 
+    /**
+     * Checks the given {@link IgniteException} that it is the instance of the 
correct class, has the correct code and message.
+     * If the exception is incorrect, {@link AssertionError} is thrown and the 
incorrect exception is added to suppressed exceptions.
+     *
+     * @param expectedClass Expected class of the exception.
+     * @param expectedErrorCode Expected error code of the {@link 
IgniteException}.
+     * @param expectedMessageSubstring A substring that must be contained in 
the error message of the exception.
+     * @param exception Exception to check.
+     */
+    public static void assertExceptionIsExpected(

Review Comment:
   Why it's not assertThrowsWith**Cause**? 
   What I mean here is that I'd expect 3 overloaded versions where less 
specific ones will call generalized with null as code or message just like 
current assertThrowsWithCause do
   ```
       public static Throwable assertThrowsWithCause(
               RunnableX run,
               Class<? extends Throwable> cls
       ) {
           return assertThrowsWithCause(run, cls, null);
       }
   ```



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to