nastra commented on code in PR #11738:
URL: https://github.com/apache/iceberg/pull/11738#discussion_r1913050734


##########
core/src/test/java/org/apache/iceberg/hadoop/TestCachingCatalog.java:
##########
@@ -166,6 +168,42 @@ public void testTableName() throws Exception {
         .isEqualTo("hadoop.db.ns1.ns2.tbl.snapshots");
   }
 
+  @Test
+  public void testNonExistingTable() throws Exception {
+    Catalog catalog = CachingCatalog.wrap(hadoopCatalog());
+
+    TableIdentifier tableIdent = TableIdentifier.of("otherDB", "otherTbl");
+
+    assertThatThrownBy(() -> catalog.loadTable(tableIdent))
+        .isInstanceOf(NoSuchTableException.class);

Review Comment:
   please also add `.hasMessage("Table does not exist: otherDB.otherTbl")`here 
as we try to avoid to only check for the exception and typically always want to 
make sure we get the right error msg



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