apex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From che...@apache.org
Subject [23/50] incubator-apex-core git commit: deleting the test folder quietly
Date Wed, 09 Sep 2015 22:12:54 GMT
deleting the test folder quietly


Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/commit/d57e0770
Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/tree/d57e0770
Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/diff/d57e0770

Branch: refs/heads/master
Commit: d57e0770d4202112b4837662c724f04c16cc9a29
Parents: 3f8f97e
Author: Chandni Singh <chandni@datatorrent.com>
Authored: Mon Aug 10 14:19:36 2015 -0700
Committer: Chandni Singh <chandni@datatorrent.com>
Committed: Mon Aug 10 14:26:48 2015 -0700

----------------------------------------------------------------------
 .../java/com/datatorrent/stram/engine/AutoMetricTest.java | 10 ----------
 .../com/datatorrent/stram/support/StramTestSupport.java   |  7 +------
 2 files changed, 1 insertion(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/d57e0770/engine/src/test/java/com/datatorrent/stram/engine/AutoMetricTest.java
----------------------------------------------------------------------
diff --git a/engine/src/test/java/com/datatorrent/stram/engine/AutoMetricTest.java b/engine/src/test/java/com/datatorrent/stram/engine/AutoMetricTest.java
index 752adeb..3ca5221 100644
--- a/engine/src/test/java/com/datatorrent/stram/engine/AutoMetricTest.java
+++ b/engine/src/test/java/com/datatorrent/stram/engine/AutoMetricTest.java
@@ -15,7 +15,6 @@
  */
 package com.datatorrent.stram.engine;
 
-import java.io.File;
 import java.io.IOException;
 import java.io.Serializable;
 import java.util.Collection;
@@ -23,7 +22,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.CountDownLatch;
 
-import org.apache.commons.io.FileUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.junit.Assert;
 import org.junit.Rule;
@@ -231,8 +229,6 @@ public class AutoMetricTest
   {
     CountDownLatch latch = new CountDownLatch(1);
 
-    FileUtils.deleteDirectory(new File(testMeta.dir)); // clean any state from previous run
-
     LogicalPlanConfiguration lpc = new LogicalPlanConfiguration(new Configuration());
     LogicalPlan dag = new LogicalPlan();
 
@@ -262,8 +258,6 @@ public class AutoMetricTest
   {
     CountDownLatch latch = new CountDownLatch(2);
 
-    FileUtils.deleteDirectory(new File(testMeta.dir)); // clean any state from previous run
-
     LogicalPlanConfiguration lpc = new LogicalPlanConfiguration(new Configuration());
     LogicalPlan dag = new LogicalPlan();
     dag.setAttribute(LogicalPlan.APPLICATION_PATH, testMeta.dir);
@@ -289,8 +283,6 @@ public class AutoMetricTest
   @Test
   public void testInjectionOfDefaultMetricsAggregator() throws Exception
   {
-    FileUtils.deleteDirectory(new File(testMeta.dir)); // clean any state from previous run
-
     LogicalPlanConfiguration lpc = new LogicalPlanConfiguration(new Configuration());
     LogicalPlan dag = new LogicalPlan();
     dag.setAttribute(LogicalPlan.APPLICATION_PATH, testMeta.dir);
@@ -367,8 +359,6 @@ public class AutoMetricTest
   {
     CountDownLatch latch = new CountDownLatch(1);
 
-    FileUtils.deleteDirectory(new File(testMeta.dir)); // clean any state from previous run
-
     LogicalPlanConfiguration lpc = new LogicalPlanConfiguration(new Configuration());
     LogicalPlan dag = new LogicalPlan();
 

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/d57e0770/engine/src/test/java/com/datatorrent/stram/support/StramTestSupport.java
----------------------------------------------------------------------
diff --git a/engine/src/test/java/com/datatorrent/stram/support/StramTestSupport.java b/engine/src/test/java/com/datatorrent/stram/support/StramTestSupport.java
index 167cfd8..71a402e 100644
--- a/engine/src/test/java/com/datatorrent/stram/support/StramTestSupport.java
+++ b/engine/src/test/java/com/datatorrent/stram/support/StramTestSupport.java
@@ -265,12 +265,7 @@ abstract public class StramTestSupport
     @Override
     protected void finished(org.junit.runner.Description description)
     {
-      try {
-        FileUtils.deleteDirectory(new File(this.dir));
-      }
-      catch (IOException e) {
-        throw new RuntimeException(e);
-      }
+      FileUtils.deleteQuietly(new File(this.dir));
     }
   }
 


Mime
View raw message