IGNITE-7626 Unify code in test which clean up persistence directories - Fixes #3512.
authorEdShangGG <eshangareev@gridgain.com>
Mon, 12 Feb 2018 18:44:10 +0000 (21:44 +0300)
committerAlexey Goncharuk <alexey.goncharuk@gmail.com>
Mon, 12 Feb 2018 18:44:10 +0000 (21:44 +0300)
Signed-off-by: Alexey Goncharuk <alexey.goncharuk@gmail.com>
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/IgniteMassLoadSandboxTest.java
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheDestroyDuringCheckpointTest.java

index b043fa9..316cb8b 100644 (file)
@@ -154,8 +154,8 @@ public class IgniteMassLoadSandboxTest extends GridCommonAbstractTest {
     @Override protected void beforeTest() throws Exception {
         stopAllGrids();
 
-        deleteRecursively(U.resolveWorkDirectory(U.defaultWorkDirectory(), "db", false));
-        deleteRecursively(U.resolveWorkDirectory(U.defaultWorkDirectory(), "temp", false));
+        U.delete(U.resolveWorkDirectory(U.defaultWorkDirectory(), "db", false));
+        U.delete(U.resolveWorkDirectory(U.defaultWorkDirectory(), "temp", false));
     }
 
     /** {@inheritDoc} */
index 72f73aa..fba62df 100644 (file)
@@ -80,7 +80,7 @@ public class IgnitePdsCacheDestroyDuringCheckpointTest extends GridCommonAbstrac
     @Override protected void beforeTestsStarted() throws Exception {
         super.beforeTestsStarted();
 
-        deleteWorkFiles();
+        cleanPersistenceDir();
     }
 
     /** {@inheritDoc} */
@@ -89,7 +89,7 @@ public class IgnitePdsCacheDestroyDuringCheckpointTest extends GridCommonAbstrac
 
         stopAllGrids();
 
-        deleteWorkFiles();
+        cleanPersistenceDir();
     }
 
     /**
@@ -151,11 +151,4 @@ public class IgnitePdsCacheDestroyDuringCheckpointTest extends GridCommonAbstrac
             }
         }
     }
-
-    /**
-     * @throws IgniteCheckedException If fail.
-     */
-    private void deleteWorkFiles() throws IgniteCheckedException {
-        deleteRecursively(U.resolveWorkDirectory(U.defaultWorkDirectory(), DFLT_STORE_DIR, false));
-    }
 }
\ No newline at end of file