You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2013/11/15 20:48:49 UTC
[3/6] git commit: ACCUMULO-1890 Forgot to re-add changes before commit
ACCUMULO-1890 Forgot to re-add changes before commit
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/a40a6d42
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a40a6d42
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a40a6d42
Branch: refs/heads/master
Commit: a40a6d423e42da45193a4ecf480a3dcbe43b88a8
Parents: 7e23cf2
Author: Josh Elser <el...@apache.org>
Authored: Fri Nov 15 11:37:33 2013 -0800
Committer: Josh Elser <el...@apache.org>
Committed: Fri Nov 15 11:37:33 2013 -0800
----------------------------------------------------------------------
.../minicluster/MiniAccumuloClusterGCTest.java | 28 +++++++++++++-------
1 file changed, 18 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/a40a6d42/src/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterGCTest.java
----------------------------------------------------------------------
diff --git a/src/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterGCTest.java b/src/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterGCTest.java
index d58eb47..c32e719 100644
--- a/src/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterGCTest.java
+++ b/src/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterGCTest.java
@@ -36,6 +36,7 @@ import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import com.google.common.collect.ImmutableMap;
+import com.google.common.io.Files;
/**
*
@@ -44,16 +45,23 @@ public class MiniAccumuloClusterGCTest {
@Test
public void testGcConfig() throws Exception {
-
- MiniAccumuloConfig macConfig = new MiniAccumuloConfig(tmpDir.getRoot(), passwd);
- macConfig.setNumTservers(1);
-
- Assert.assertEquals(false, macConfig.shouldRunGC());
-
- // Turn on the garbage collector
- macConfig.runGC(true);
-
- Assert.assertEquals(true, macConfig.shouldRunGC());
+ File f = Files.createTempDir();
+ f.deleteOnExit();
+ try {
+ MiniAccumuloConfig macConfig = new MiniAccumuloConfig(f, passwd);
+ macConfig.setNumTservers(1);
+
+ Assert.assertEquals(false, macConfig.shouldRunGC());
+
+ // Turn on the garbage collector
+ macConfig.runGC(true);
+
+ Assert.assertEquals(true, macConfig.shouldRunGC());
+ } finally {
+ if (null != f && f.exists()) {
+ f.delete();
+ }
+ }
}