diff --git a/base/sourceTest/java/ch/systemsx/cisd/base/tests/AbstractFileSystemTestCase.java b/base/sourceTest/java/ch/systemsx/cisd/base/tests/AbstractFileSystemTestCase.java index 09924d068626810882684401f665187a3286fa09..c4f40b0c92266d900bf7f2786fa7773c0240217f 100644 --- a/base/sourceTest/java/ch/systemsx/cisd/base/tests/AbstractFileSystemTestCase.java +++ b/base/sourceTest/java/ch/systemsx/cisd/base/tests/AbstractFileSystemTestCase.java @@ -67,11 +67,23 @@ public abstract class AbstractFileSystemTestCase extends AssertJUnit @BeforeMethod public void setUp() throws IOException { - FileUtils.deleteDirectory(workingDirectory); + deleteDirectory(workingDirectory); workingDirectory.mkdir(); assertTrue(workingDirectory.isDirectory() && workingDirectory.listFiles().length == 0); } + private void deleteDirectory(File dir) + { + try + { + FileUtils.deleteDirectory(dir); + } catch (IOException e) + { + System.err.println("Could not delete the directory " + dir.getPath() + " because: " + + e.getMessage()); + } + } + @AfterClass public void afterClass() throws IOException {