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


##########
api/src/test/java/org/apache/iceberg/io/TestCloseableIterable.java:
##########
@@ -91,10 +90,9 @@ public void testConcatWithEmptyIterables() {
     // This will throw a NoSuchElementException
     CloseableIterable<Integer> concat5 =
         CloseableIterable.concat(Lists.newArrayList(empty, empty, empty));
-    AssertHelpers.assertThrows(
-        "should throw NoSuchElementException",
-        NoSuchElementException.class,
-        () -> Iterables.getLast(concat5));
+
+    Assertions.assertThatThrownBy(() -> Iterables.getLast(concat5))
+        .isInstanceOf(NoSuchElementException.class);

Review Comment:
   ah ok, thanks for checking. Alternatively we could use `.hasMessage(null)` 
to indicate that there's no message I guess



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