ajantha-bhat commented on code in PR #8909:
URL: https://github.com/apache/iceberg/pull/8909#discussion_r1383363198


##########
core/src/test/java/org/apache/iceberg/view/ViewCatalogTests.java:
##########
@@ -400,8 +400,15 @@ public void 
replaceTableViaTransactionThatAlreadyExistsAsView() {
                     .buildTable(viewIdentifier, SCHEMA)
                     .replaceTransaction()
                     .commitTransaction())
-        .isInstanceOf(NoSuchTableException.class)
-        .hasMessageStartingWith("Table does not exist: ns.view");
+        .satisfiesAnyOf(
+            throwable ->
+                assertThat(throwable)
+                    .isInstanceOf(NoSuchTableException.class)
+                    .hasMessageStartingWith("Table does not exist: ns.view"),
+            throwable ->
+                assertThat(throwable)

Review Comment:
   
   `replaceTableViaTransactionThatAlreadyExistsAsView`
        `NessieTableOperations.doRefresh() `--> throws 
`AlreadyExistsException`. But expecting `NoSuchViewException`.
   
   If I fix it, another test case 
(createOrReplaceTableViaTransactionThatAlreadyExistsAsView) fails.
   Because from the same place `doRefresh()` we are expecting two different 
kind of exceptions. I think test case need to be modified instead of unifying 
code.



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

Reply via email to