ddanielr commented on code in PR #4096:
URL: https://github.com/apache/accumulo/pull/4096#discussion_r1446593961


##########
test/src/main/java/org/apache/accumulo/test/shell/ShellIT.java:
##########
@@ -557,6 +560,42 @@ public void execFileTest() throws IOException {
     assertGoodExit("Unknown command", false);
   }
 
+  @TempDir
+  private static File tempDir;
+
+  @Test
+  public void propFileNotFoundTest() throws IOException {
+    String fileName = new File(tempDir, "propFile.shellit").getAbsolutePath();
+
+    Shell.log.debug("Starting prop file not found test 
--------------------------");
+    exec("config --propFile " + fileName, false,
+        "FileNotFoundException: " + fileName + "(No such file or directory)");
+  }
+
+  @Test
+  public void setpropsViaFile() throws Exception {
+
+    File file = File.createTempFile("propFile", ".conf",
+        new File("src/main/resources/org/apache/accumulo/test/"));
+    PrintWriter writer = new PrintWriter(file.getAbsolutePath());
+    writer.println(COMPACTION_WARN_TIME.getKey() + "=11m");
+    writer.close();
+    exec("config --propFile " + file.getAbsolutePath(), true);
+    file.deleteOnExit();

Review Comment:
   Once this test uses TempDir this line is no longer needed as tempDir is 
cleaned up by JUnit after a test run. 
   ```suggestion
   ```



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

Reply via email to