diff options
author | Fiachra Corcoran <fiachra.corcoran@est.tech> | 2019-06-27 08:33:55 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-06-27 08:33:55 +0000 |
commit | 8f28bfe406b657c924440dcee6e3d7b302ce639c (patch) | |
tree | f532d5e6b8568bcf32e1943bb7d8ee3f53c7aea5 /datarouter-node/src | |
parent | 8528bac26723e619901f4020848b2cf05538f43d (diff) | |
parent | c466fbd0026bfc715b4f51854186c62625e8cb61 (diff) |
Merge "Adding to unit test coverage"
Diffstat (limited to 'datarouter-node/src')
-rw-r--r-- | datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/LogManagerTest.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/LogManagerTest.java b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/LogManagerTest.java index b95fb365..c890ed50 100644 --- a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/LogManagerTest.java +++ b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/LogManagerTest.java @@ -26,7 +26,9 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.io.File; +import java.io.IOException; import java.util.Timer; +import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.reflect.FieldUtils; import org.junit.After; import org.junit.Before; @@ -55,14 +57,9 @@ public class LogManagerTest { } @After - public void tearDown() { + public void tearDown() throws IOException { File spoolDir = new File(System.getProperty("user.dir") + "/src/test/resources/.spool"); - for (File file : spoolDir.listFiles()) { - if (file.exists()) { - file.delete(); - } - } - spoolDir.delete(); + FileUtils.deleteDirectory(spoolDir); } @Test |