X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fconfig%2Fyang-jmx-generator-plugin%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyangjmxgenerator%2Fplugin%2FAbstractGeneratorTest.java;h=fb5cd2e9899cdbe96540ff322ed3f5c4c5d50f1b;hp=1dde94b48244fed6b8ca5867b874280f3aa425ee;hb=b2a7e1a511100f0512095da585c2b717bb0101b5;hpb=72a2f458d328d443e2a5479ac147c1242a41a70f diff --git a/opendaylight/config/yang-jmx-generator-plugin/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/AbstractGeneratorTest.java b/opendaylight/config/yang-jmx-generator-plugin/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/AbstractGeneratorTest.java index 1dde94b482..fb5cd2e989 100644 --- a/opendaylight/config/yang-jmx-generator-plugin/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/AbstractGeneratorTest.java +++ b/opendaylight/config/yang-jmx-generator-plugin/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/AbstractGeneratorTest.java @@ -7,12 +7,10 @@ */ package org.opendaylight.controller.config.yangjmxgenerator.plugin; -import org.apache.commons.io.FileUtils; +import java.io.File; import org.junit.Before; import org.opendaylight.controller.config.yangjmxgenerator.AbstractYangTest; -import java.io.File; - public abstract class AbstractGeneratorTest extends AbstractYangTest { private static final File GENERATOR_OUTPUT_PATH_ROOT = new File( "target/testgen"); @@ -25,7 +23,21 @@ public abstract class AbstractGeneratorTest extends AbstractYangTest { @Before public void cleanUpDirectory() throws Exception { - FileUtils.deleteDirectory(generatorOutputPath); + deleteFolder(generatorOutputPath); + } + + public void deleteFolder(File folder) { + File[] files = folder.listFiles(); + if (files != null) { + for (File f: files) { + if (f.isDirectory()) { + deleteFolder(f); + } else { + f.delete(); + } + } + } + folder.delete(); } }