Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static void setUpBeforeClass() throws Exception {
programVersion = new ProgramVersion();
programVersion.init();
executionDir = Files.createTempDir();
executionDir.deleteOnExit();
FileUtils.forceDeleteOnExit(executionDir);
}

@Test
Expand All @@ -50,7 +50,7 @@ public void test() throws IOException, InterruptedException, IntegrationExceptio

File detectOutputFile = File.createTempFile("detectOutput", ".txt");
detectOutputFile.setWritable(true);
detectScriptFile.deleteOnExit();
detectOutputFile.deleteOnExit();

StringBuffer sb = new StringBuffer();
sb.append("#\n");
Expand All @@ -70,7 +70,7 @@ public void test() throws IOException, InterruptedException, IntegrationExceptio
System.out.printf("Detect wrapper script content:\n%s\n", detectWrapperScriptString);
File detectWrapperScriptFile = File.createTempFile("detectWrapper", ".sh");
detectWrapperScriptFile.setExecutable(true);
detectScriptFile.deleteOnExit();
detectWrapperScriptFile.deleteOnExit();
System.out.printf("script file: %s\n", detectWrapperScriptFile.getAbsolutePath());
FileUtils.write(detectWrapperScriptFile, detectWrapperScriptString, StandardCharsets.UTF_8);
Map<String, String> env = new HashMap<>(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public static File createTempDirectory() throws IOException {
if (!temp.mkdir()) {
throw new IOException("Could not create temp directory: " + temp.getAbsolutePath());
}
FileUtils.forceDeleteOnExit(temp);
return temp;
}

Expand Down