nastra commented on code in PR #7253:
URL: https://github.com/apache/iceberg/pull/7253#discussion_r1154314288
##########
core/src/test/java/org/apache/iceberg/hadoop/HadoopFileIOTest.java:
##########
@@ -175,10 +181,16 @@ private List<Path> createRandomFiles(Path parent, int
count) {
Path path = new Path(parent, "file-" + i);
paths.add(path);
fs.createNewFile(path);
+ createdFiles.increment();
} catch (IOException e) {
throw new UncheckedIOException(e);
}
});
+
+ Awaitility.await()
+ .atMost(30, TimeUnit.SECONDS)
+ .untilAsserted(() ->
Assertions.assertThat(createdFiles.intValue()).isEqualTo(count));
+
return paths;
Review Comment:
printing the created files in `testDeleteFiles` shows the `null` in `paths`
which lead to the NPE:
```
filesCreated = [null, file:/tmp/junit6934791194407302730/file-431529176,
file:/tmp/junit6934791194407302730/file-1761283695,
file:/tmp/junit6934791194407302730/file-1749940626,
file:/tmp/junit6934791194407302730/file-892128508,
file:/tmp/junit6934791194407302730/file-155629808,
file:/tmp/junit6934791194407302730/file-1429008869,
file:/tmp/junit6934791194407302730/file--1465154083,
file:/tmp/junit6934791194407302730/file--138487339,
file:/tmp/junit6934791194407302730/file--1242363800]
```
--
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]