Cleanup temporary test files
[controller.git] / opendaylight / config / config-persister-file-xml-adapter / src / test / java / org / opendaylight / controller / config / persist / storage / file / xml / FileStorageAdapterTest.java
index 3ea9a48a5d759bb9c2cecf830fdc4cd40e3c9bdf..16ea1b843102c46bc637d81a61653e6bf1e6710a 100644 (file)
@@ -38,6 +38,7 @@ public class FileStorageAdapterTest {
     @Before
     public void setUp() throws Exception {
         file = Files.createTempFile("testFilePersist", ".txt").toFile();
+        file.deleteOnExit();
         if (!file.exists()) {
             return;
         }
@@ -185,6 +186,7 @@ public class FileStorageAdapterTest {
     @Test
     public void testNoLastConfig() throws Exception {
         File file = Files.createTempFile("testFilePersist", ".txt").toFile();
+        file.deleteOnExit();
         if (!file.exists()) {
             return;
         }