incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject git commit: Adding some code to try and clear out files that were produced by tests in the wrong location.
Date Tue, 24 Jun 2014 14:25:14 GMT
Repository: incubator-blur
Updated Branches:
  refs/heads/apache-blur-0.2 33ef68b16 -> b2e2952d8


Adding some code to try and clear out files that were produced by tests in the wrong location.


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

Branch: refs/heads/apache-blur-0.2
Commit: b2e2952d8e996a7882b5b5484da3109c372ebbf4
Parents: 33ef68b
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Tue Jun 24 10:24:58 2014 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue Jun 24 10:24:58 2014 -0400

----------------------------------------------------------------------
 .../org/apache/blur/console/ConsoleTestBase.java     | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b2e2952d/blur-console/src/test/java/org/apache/blur/console/ConsoleTestBase.java
----------------------------------------------------------------------
diff --git a/blur-console/src/test/java/org/apache/blur/console/ConsoleTestBase.java b/blur-console/src/test/java/org/apache/blur/console/ConsoleTestBase.java
index aabe047..09cbce9 100644
--- a/blur-console/src/test/java/org/apache/blur/console/ConsoleTestBase.java
+++ b/blur-console/src/test/java/org/apache/blur/console/ConsoleTestBase.java
@@ -34,7 +34,22 @@ public class ConsoleTestBase {
       Config.setupMiniCluster();
       _managing = true;
     }
+    File file = new File("test-data");
+    if (file.exists()) {
+      rmr(file);
+    }
+  }
 
+  private static void rmr(File file) {
+    if (!file.exists()) {
+      return;
+    }
+    if (file.isDirectory()) {
+      for (File f : file.listFiles()) {
+        rmr(f);
+      }
+    }
+    file.delete();
   }
 
   @AfterClass


Mime
View raw message