rdblue commented on code in PR #5268:
URL: https://github.com/apache/iceberg/pull/5268#discussion_r922337676
##########
api/src/test/java/org/apache/iceberg/io/TestCloseableIterable.java:
##########
@@ -82,4 +85,61 @@ public void testConcateWithEmptyIterables() {
NoSuchElementException.class,
() -> Iterables.getLast(concat5));
}
+
+ @Test
+ public void testWithCompletionRunnable() throws IOException {
+ AtomicInteger completionCounter = new AtomicInteger(0);
+ List<Integer> items = Lists.newArrayList(1, 2, 3, 4, 5);
+ Assertions.assertThatThrownBy(() ->
+
CloseableIterable.whenComplete(CloseableIterable.combine(items, () -> { }),
null))
+ .isInstanceOf(NullPointerException.class)
+ .hasMessage("Cannot execute a null Runnable after completion");
Review Comment:
Indentation is off. It should be 2 spaces per indent and 2 indents for
continuation indents.
--
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]