manuzhang commented on code in PR #14501:
URL: https://github.com/apache/iceberg/pull/14501#discussion_r2494376794
##########
core/src/test/java/org/apache/iceberg/hadoop/TestHadoopFileIO.java:
##########
@@ -136,6 +177,27 @@ public void testDeleteFiles() {
file ->
assertThat(hadoopFileIO.newInputFile(file.toString()).exists()).isFalse());
}
+ @Test
+ public void testDeleteFilesWithTrashEnabled() throws IOException {
+ Configuration conf = new Configuration();
+ conf.set(FS_TRASH_INTERVAL_KEY, "60");
+ fs = FileSystem.getLocal(conf);
+
+ hadoopFileIO = new HadoopFileIO(conf);
+ Path parent = new Path(tempDir.toURI());
+ List<Path> filesCreated = createRandomFiles(parent, 10);
Review Comment:
Do we test the path to delete is a directory?
##########
core/src/test/java/org/apache/iceberg/hadoop/TestHadoopFileIO.java:
##########
@@ -136,6 +177,27 @@ public void testDeleteFiles() {
file ->
assertThat(hadoopFileIO.newInputFile(file.toString()).exists()).isFalse());
}
+ @Test
+ public void testDeleteFilesWithTrashEnabled() throws IOException {
+ Configuration conf = new Configuration();
+ conf.set(FS_TRASH_INTERVAL_KEY, "60");
+ fs = FileSystem.getLocal(conf);
+
+ hadoopFileIO = new HadoopFileIO(conf);
+ Path parent = new Path(tempDir.toURI());
+ List<Path> filesCreated = createRandomFiles(parent, 10);
Review Comment:
Do we test the case when the path to delete is a directory?
--
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]