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


##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/TestChangelogIterator.java:
##########
@@ -196,10 +196,10 @@ public void testUpdatedRowsWithDuplication() {
     Iterator<Row> iterator =
         ChangelogIterator.computeUpdates(rowsWithDuplication.iterator(), 
SCHEMA, IDENTIFIER_FIELDS);
 
-    assertThrows(
-        "Cannot compute updates because there are multiple rows with the same 
identifier fields([id, name]). Please make sure the rows are unique.",
-        IllegalStateException.class,
-        () -> Lists.newArrayList(iterator));
+    assertThatThrownBy(() -> Lists.newArrayList(iterator))
+        .as(
+            "Cannot compute updates because there are multiple rows with the 
same identifier fields([id, name]). Please make sure the rows are unique.")
+        .isInstanceOf(IllegalStateException.class);

Review Comment:
   can you please add a `.hasMessage()` check here?



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