nastra commented on code in PR #8907: URL: https://github.com/apache/iceberg/pull/8907#discussion_r1379887487
########## core/src/test/java/org/apache/iceberg/view/ViewCatalogTests.java: ########## @@ -718,8 +743,16 @@ public void renameTableTargetAlreadyExistsAsView() { assertThat(catalog().viewExists(viewIdentifier)).as("View should exist").isTrue(); assertThatThrownBy(() -> tableCatalog().renameTable(tableIdentifier, viewIdentifier)) - .isInstanceOf(AlreadyExistsException.class) - .hasMessageContaining("Cannot rename ns.table to ns.view. View already exists"); + .satisfiesAnyOf( + throwable -> + assertThat(throwable) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("new table ns.view already exists"), Review Comment: why is this one needed? I think it might be better to adjust the error reporting on the catalog side -- 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