Skip to content
Snippets Groups Projects
Commit 4ab69b69 authored by cramakri's avatar cramakri
Browse files

LMS-1984 Made AbstractFileSystemTestCase cleanup more robust.

SVN: 19578
parent 4c0999c2
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package ch.systemsx.cisd.base.tests; package ch.systemsx.cisd.base.tests;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays; import java.util.Arrays;
...@@ -39,8 +40,8 @@ public abstract class AbstractFileSystemTestCase extends AssertJUnit ...@@ -39,8 +40,8 @@ public abstract class AbstractFileSystemTestCase extends AssertJUnit
protected static final String TARGETS_DIRECTORY = "targets"; protected static final String TARGETS_DIRECTORY = "targets";
private static final File UNIT_TEST_ROOT_DIRECTORY = private static final File UNIT_TEST_ROOT_DIRECTORY = new File(TARGETS_DIRECTORY
new File(TARGETS_DIRECTORY + File.separator + UNIT_TEST_WORKING_DIRECTORY); + File.separator + UNIT_TEST_WORKING_DIRECTORY);
protected final File workingDirectory; protected final File workingDirectory;
...@@ -105,6 +106,12 @@ public abstract class AbstractFileSystemTestCase extends AssertJUnit ...@@ -105,6 +106,12 @@ public abstract class AbstractFileSystemTestCase extends AssertJUnit
{ {
return; return;
} }
FileUtils.deleteDirectory(workingDirectory); try
{
FileUtils.deleteDirectory(workingDirectory);
} catch (FileNotFoundException ex)
{
// Ignore
}
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment