kevinrr888 commented on code in PR #5547:
URL: https://github.com/apache/accumulo/pull/5547#discussion_r2116451455


##########
minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterClasspathTest.java:
##########
@@ -65,14 +66,15 @@ public class MiniAccumuloClusterClasspathTest extends 
WithTestNames {
 
   @BeforeAll
   public static void setupMiniCluster() throws Exception {
-    File baseDir =
-        
Path.of(System.getProperty("user.dir")).resolve("target").resolve("mini-tests").toFile();
-    assertTrue(baseDir.mkdirs() || baseDir.isDirectory());
-    testDir = 
baseDir.toPath().resolve(MiniAccumuloClusterTest.class.getName()).toFile();
+    Path baseDir = 
Path.of(System.getProperty("user.dir")).resolve("target").resolve("mini-tests");
+    if (!Files.isDirectory(baseDir)) {
+      Files.createDirectories(baseDir);
+    }
+    testDir = 
baseDir.resolve(MiniAccumuloClusterTest.class.getName()).toFile();

Review Comment:
   probably still want the assertion or similar. E.g., after the if, 
assertTrue(Files.isDirectory(targetDir)



-- 
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: notifications-unsubscr...@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to