yandrey321 commented on code in PR #11118:
URL: https://github.com/apache/ozone/pull/11118#discussion_r3866944935


##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/service/TestDirectoryDeletingService.java:
##########
@@ -331,4 +331,63 @@ void testPurgeDirectoriesBatching() throws Exception {
     org.apache.commons.io.FileUtils.deleteDirectory(testDir);
   }
 
+  @Test
+  @DisplayName("DirectoryDeletingService submits one bucket per 
PurgeDirectories transaction")
+  void testPurgeDirectoriesGroupedByBucketPerTransaction() throws Exception {
+    OzoneConfiguration conf = new OzoneConfiguration();
+    File testDir = Files.createTempDirectory("TestDDS-BucketGroup").toFile();
+    ServerUtils.setOzoneMetaDirPath(conf, testDir.toString());
+    conf.setTimeDuration(OMConfigKeys.OZONE_DIR_DELETING_SERVICE_INTERVAL, 
100, TimeUnit.MILLISECONDS);
+    conf.setQuietMode(false);

Review Comment:
   Fixed by reusing the class's existing @TempDir folder (the same managed dir 
createConfAndInitValues uses) instead of a hand-rolled 
Files.createTempDirectory, and dropped the manual deleteDirectory calls. 
JUnit's @TempDir cleans up after each test regardless of assertion failures, so 
there's no leak and no finally needed.



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