sanpwc commented on code in PR #3092: URL: https://github.com/apache/ignite-3/pull/3092#discussion_r1475879081
########## 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: I'd expected that it'll be an overloaded version of `assertThrowsWithCause` with code parameter in addition to cls and msg that will use extended `hasCause` with extra code param ``` public static boolean hasCause( Throwable t, Class<?> cls, @Nullable Integer errorCode @Nullable String messageFragment ) { ``` -- 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