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


##########
hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/AccumuloFileOutputFormatIT.java:
##########
@@ -175,38 +176,37 @@ public int run(String[] args) throws Exception {
     public static void main(String[] args) throws Exception {
       Configuration conf = new Configuration();
       conf.set("mapreduce.framework.name", "local");
-      conf.set("mapreduce.cluster.local.dir", 
java.nio.file.Path.of(System.getProperty("user.dir"))
-          
.resolve("target").resolve("mapreduce-tmp").toFile().getAbsolutePath());
+      conf.set("mapreduce.cluster.local.dir",
+          tempDir.resolve("mapreduce-tmp").toAbsolutePath().toString());
       assertEquals(0, ToolRunner.run(conf, new MRTester(), args));
     }
   }
 
   private void handleWriteTests(boolean content) throws Exception {
-    File f = tempDir.toPath().resolve(testName()).toFile();
-    assertTrue(f.createNewFile(), "Failed to create file: " + f);
-    if (f.delete()) {
-      log.debug("Deleted {}", f);
-    }
-    MRTester.main(new String[] {content ? TEST_TABLE : EMPTY_TABLE, 
f.getAbsolutePath()});
-
-    assertTrue(f.exists());
-    File[] files = f.listFiles(file -> file.getName().startsWith("part-m-"));
-    assertNotNull(files);
-    if (content) {
-      assertEquals(1, files.length);
-      assertTrue(files[0].exists());
+    java.nio.file.Path f = tempDir.resolve(testName());
+    Files.createFile(f);
+    Files.deleteIfExists(f);

Review Comment:
   Yea I think its to make sure that the file can be created there.



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