You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "nastra (via GitHub)" <gi...@apache.org> on 2023/03/21 12:34:21 UTC

[GitHub] [iceberg] nastra commented on a diff in pull request #7159: MR: Remove deprecate AssertHelpers

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


##########
mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerNoScan.java:
##########
@@ -210,28 +210,25 @@ public void testCreateDropTable() throws TException, IOException, InterruptedExc
       shell.executeStatement("DROP TABLE customers");
 
       // Check if the table was really dropped even from the Catalog
-      AssertHelpers.assertThrows(
-          "should throw exception",
-          NoSuchTableException.class,
-          "Table does not exist",
-          () -> {
-            testTables.loadTable(identifier);
-          });
+      Assertions.assertThatThrownBy(
+              () -> {

Review Comment:
   nit: the { } aren't necessary here and further below



##########
mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerNoScan.java:
##########
@@ -272,13 +269,12 @@ public void testCreateDropTableNonDefaultCatalog() throws TException, Interrupte
 
     shell.executeStatement("DROP TABLE default.customers");
     // Check if the table was really dropped even from the Catalog
-    AssertHelpers.assertThrows(
-        "should throw exception",
-        NoSuchTableException.class,
-        "Table does not exist",
-        () -> {
-          testTables.loadTable(identifier);
-        });
+    Assertions.assertThatThrownBy(
+            () -> {
+              testTables.loadTable(identifier);
+            })
+        .isInstanceOf(NoSuchTableException.class)
+        .hasMessageStartingWith("Table does not exist");

Review Comment:
   nit: should this also include the table name like the others further below?



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org