mukund-thakur commented on code in PR #7197:
URL: https://github.com/apache/hadoop/pull/7197#discussion_r1894234828


##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestBulkDeleteCommand.java:
##########
@@ -64,4 +78,52 @@ public void testArguments() throws IOException, 
URISyntaxException {
         Assertions.assertThat(bulkDeleteCommand.childArgs.get(0)).
                 describedAs("Children arguments must match").isEqualTo(arg2);
     }
+
+    @Test
+    public void testLocalFileDeletion() throws IOException {
+        String deletionDir = "toDelete";
+        String baseFileName = "file_";
+        Path baseDir = new Path(testRootDir, deletionDir);
+        List<String> listOfPaths = new ArrayList<>();
+        for(int i = 0; i < 100; i++) {
+            Path p = new Path(baseDir, baseFileName + i);
+            lfs.create(p);
+            listOfPaths.add(p.toUri().toString());

Review Comment:
   What I meant is assert first that you files are created successfully like 
Assertions.assertThat(filesCreated).isEqualTo(originalFiles).hasCount(x)
   
   Your delete test won't even run if creation fails silently in the first few 
lines. 



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