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


##########
spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestTagDDL.java:
##########
@@ -137,11 +136,11 @@ public void testCreateTagUseDefaultConfig() throws 
NoSuchTableException {
     long snapshotId = table.currentSnapshot().snapshotId();
     String tagName = "t1";
 
-    AssertHelpers.assertThrows(
-        "unknown snapshot",
-        ValidationException.class,
-        "unknown snapshot: -1",
-        () -> sql("ALTER TABLE %s CREATE TAG %s AS OF VERSION %d", tableName, 
tagName, -1));
+    Assertions.assertThatThrownBy(
+            () -> sql("ALTER TABLE %s CREATE TAG %s AS OF VERSION %d", 
tableName, tagName, -1))
+        .as("unknown snapshot")

Review Comment:
   most (if not all cases) don't need `.as()` because it's implicit either 
through the expected exception or the 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to