geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [2/3] geode git commit: GEODE-2456: change JUnit4CacheTestCase tearDown to use deleteQuietly
Date Fri, 10 Feb 2017 00:07:27 GMT
GEODE-2456: change JUnit4CacheTestCase tearDown to use deleteQuietly


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/6890bbdf
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/6890bbdf
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/6890bbdf

Branch: refs/heads/feature/GEODE-2456
Commit: 6890bbdf1b822c5f7695eec242b5e7a43e5cfb49
Parents: 60fc526
Author: Kirk Lund <klund@apache.org>
Authored: Thu Feb 9 12:02:56 2017 -0800
Committer: Kirk Lund <klund@apache.org>
Committed: Thu Feb 9 15:34:46 2017 -0800

----------------------------------------------------------------------
 .../test/dunit/cache/internal/JUnit4CacheTestCase.java    | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/6890bbdf/geode-core/src/test/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java
index a511995..f8b1415 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java
@@ -22,6 +22,7 @@ import java.util.Arrays;
 import java.util.Map;
 import java.util.Properties;
 
+import org.apache.commons.io.FileUtils;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.cache.AttributesFactory;
@@ -41,7 +42,6 @@ import org.apache.geode.cache.client.PoolManager;
 import org.apache.geode.cache30.CacheSerializableRunnable;
 import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.distributed.internal.DistributionMessageObserver;
-import org.apache.geode.internal.FileUtil;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.InternalRegionArguments;
 import org.apache.geode.internal.cache.LocalRegion;
@@ -568,17 +568,13 @@ public abstract class JUnit4CacheTestCase extends JUnit4DistributedTestCase
   }
 
   public static final void cleanDiskDirs() throws IOException {
-    FileUtil.delete(getDiskDir());
+    FileUtils.deleteQuietly(getDiskDir());
     Arrays.stream(new File(".").listFiles()).forEach(file -> deleteBACKUPDiskStoreFile(file));
   }
 
   private static void deleteBACKUPDiskStoreFile(final File file) {
     if (file.getName().startsWith("BACKUPDiskStore-")) {
-      try {
-        FileUtil.delete(file);
-      } catch (IOException e) {
-        throw new RuntimeException("Unable to delete BACKUPDiskStore file", e);
-      }
+      FileUtils.deleteQuietly(file);
     }
   }
 


Mime
View raw message