Commit 34e46db9 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Fixing random error test

parent c3a431d0
......@@ -19,7 +19,7 @@
*/
package nl.lumc.sasc.biopet.pipelines.shiva
import java.io.{File, FileOutputStream}
import java.io.{File, FileOutputStream, IOException}
import com.google.common.io.Files
import nl.lumc.sasc.biopet.core.BiopetPipe
......@@ -208,8 +208,15 @@ trait ShivaVariantcallingTestTrait extends TestNGSuite with Matchers {
}
// remove temporary run directory all tests in the class have been run
@AfterClass def removeTempOutputDir(): Unit = {
dirs.foreach(FileUtils.deleteDirectory)
@AfterClass def removeTempOutputDir() = {
dirs.filter(_.exists()).foreach { dir =>
try {
FileUtils.deleteDirectory(dir)
} catch {
case e: IOException if e.getMessage.startsWith("Unable to delete directory") =>
Logging.logger.error(e.getMessage)
}
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment