Minor fixes to ItemImport/Export ITs. Delete temp files on exit instead of immediately (as immediately sometimes fails)

This commit is contained in:
Tim Donohue
2024-03-07 14:49:23 -06:00
parent 85cd8bc2e7
commit a6b333cba9
2 changed files with 4 additions and 4 deletions

View File

@@ -83,9 +83,9 @@ public class ItemExportCLIIT extends AbstractIntegrationTestWithDatabase {
@After @After
@Override @Override
public void destroy() throws Exception { public void destroy() throws Exception {
PathUtils.deleteDirectory(tempDir); PathUtils.deleteOnExit(tempDir);
for (Path path : Files.list(workDir).collect(Collectors.toList())) { for (Path path : Files.list(workDir).collect(Collectors.toList())) {
PathUtils.delete(path); PathUtils.deleteOnExit(path);
} }
super.destroy(); super.destroy();
} }

View File

@@ -92,9 +92,9 @@ public class ItemImportCLIIT extends AbstractIntegrationTestWithDatabase {
@After @After
@Override @Override
public void destroy() throws Exception { public void destroy() throws Exception {
PathUtils.deleteDirectory(tempDir); PathUtils.deleteOnExit(tempDir);
for (Path path : Files.list(workDir).collect(Collectors.toList())) { for (Path path : Files.list(workDir).collect(Collectors.toList())) {
PathUtils.delete(path); PathUtils.deleteOnExit(path);
} }
super.destroy(); super.destroy();
} }