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


##########
server/tserver/src/test/java/org/apache/accumulo/tserver/InMemoryMapTest.java:
##########
@@ -800,12 +801,14 @@ IteratorScope.scan, 
getServerContext().getTableConfiguration(TableId.of("foo")),
         () -> finalIter.seek(new Range(), Set.of(), false));
   }
 
-  private String[] uniqueDirPaths(int numOfDirs) {
+  private String[] uniqueDirPaths(int numOfDirs) throws IOException {
     String[] newDirs = new String[numOfDirs];
     for (int i = 0; i < newDirs.length; i++) {
-      File newDir = tempDir.toPath().resolve(testName() + i).toFile();
-      assertTrue(newDir.isDirectory() || newDir.mkdir(), "Failed to create 
directory: " + newDir);
-      newDirs[i] = newDir.getAbsolutePath();
+      Path newDir = tempDir.resolve(testName() + i);
+      if (!Files.isDirectory(newDir)) {
+        Files.createDirectories(newDir);
+      }
+      newDirs[i] = newDir.toAbsolutePath().toString();

Review Comment:
   would be good to keep a similar assertion: 
`assertTrue(Files.isDirectory(dir))`



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