nastra commented on code in PR #13213: URL: https://github.com/apache/iceberg/pull/13213#discussion_r2120380545
########## core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java: ########## @@ -2655,19 +2654,20 @@ public void testTableExistsFallbackToGETRequest() { @Test public void testErrorHandlingForConflicts() { Consumer<ErrorResponse> errorResponseConsumer = ErrorHandlers.tableCommitHandler(); + // server returning 409 with client without retrying ErrorResponse errorResponse409WithoutRetries = ErrorResponse.builder().responseCode(409).wasRetried(false).build(); - Assertions.assertThrows( - CommitFailedException.class, - () -> errorResponseConsumer.accept(errorResponse409WithoutRetries)); + assertThatThrownBy(() -> errorResponseConsumer.accept(errorResponse409WithoutRetries)) Review Comment: can you also please update the checkstyle rule that should have caught this? ``` --- a/.baseline/checkstyle/checkstyle.xml +++ b/.baseline/checkstyle/checkstyle.xml @@ -441,7 +441,7 @@ </module> <module name="IllegalImport"> <property name="id" value="BanJUnit5AssumptionsUsage"/> - <property name="illegalPkgs" value="org.junit.jupiter.api.Assumptions"/> + <property name="illegalClasses" value="org.junit.jupiter.api.Assumptions"/> <message key="import.illegal" value="Prefer using Assertions.assumeThat(...).isTrue() instead."/> </module> <module name="IllegalImport"> @@ -451,7 +451,7 @@ </module> <module name="IllegalImport"> <property name="id" value="BanJUnit5Assertions"/> - <property name="illegalPkgs" value="org.junit.jupiter.api.Assertions"/> + <property name="illegalClasses" value="org.junit.jupiter.api.Assertions"/> <message key="import.illegal" value="Prefer using org.assertj.core.api.Assertions instead."/> </module> ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org