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 2014/10/21 00:03:31 UTC

[6/7] git commit: ACCUMULO-3243 KeyValueEquality can inherit from SimpleMacIT to get timeout functionality

ACCUMULO-3243 KeyValueEquality can inherit from SimpleMacIT to get timeout functionality


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5f29c9f6
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5f29c9f6
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5f29c9f6

Branch: refs/heads/1.6
Commit: 5f29c9f65d7b23312c2cdbd696cd291d2811fdf0
Parents: 15e8370
Author: Josh Elser <el...@apache.org>
Authored: Mon Oct 20 17:17:13 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Mon Oct 20 17:17:13 2014 -0400

----------------------------------------------------------------------
 .../accumulo/test/KeyValueEqualityTest.java     | 31 ++++----------------
 1 file changed, 6 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5f29c9f6/test/src/test/java/org/apache/accumulo/test/KeyValueEqualityTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/KeyValueEqualityTest.java b/test/src/test/java/org/apache/accumulo/test/KeyValueEqualityTest.java
index 045df38..1302b23 100644
--- a/test/src/test/java/org/apache/accumulo/test/KeyValueEqualityTest.java
+++ b/test/src/test/java/org/apache/accumulo/test/KeyValueEqualityTest.java
@@ -22,44 +22,25 @@ import java.util.Map.Entry;
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
-import org.apache.accumulo.core.client.ZooKeeperInstance;
 import org.apache.accumulo.core.client.admin.TableOperations;
-import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.minicluster.MiniAccumuloCluster;
-import org.apache.accumulo.minicluster.MiniAccumuloConfig;
-import org.junit.AfterClass;
+import org.apache.accumulo.test.functional.SimpleMacIT;
 import org.junit.Assert;
-import org.junit.BeforeClass;
 import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
 
-public class KeyValueEqualityTest {
-  public static TemporaryFolder folder = new TemporaryFolder();
-  public static MiniAccumuloCluster cluster;
-  private static final PasswordToken password = new PasswordToken("secret");
+public class KeyValueEqualityTest extends SimpleMacIT {
 
-  @BeforeClass
-  public static void setUpBeforeClass() throws Exception {
-    folder.create();
-    MiniAccumuloConfig cfg = new MiniAccumuloConfig(folder.newFolder("miniAccumulo"), new String(password.getPassword()));
-    cluster = new MiniAccumuloCluster(cfg);
-    cluster.start();
-  }
-
-  @AfterClass
-  public static void tearDownAfterClass() throws Exception {
-    cluster.stop();
-    folder.delete();
+  @Override
+  public int defaultTimeoutSeconds() {
+    return 60;
   }
 
   @Test
   public void testEquality() throws Exception {
-    final ZooKeeperInstance instance = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
-    final Connector conn = instance.getConnector("root", password);
+    Connector conn = this.getConnector();
     final BatchWriterConfig config = new BatchWriterConfig();
 
     final String table1 = "table1", table2 = "table2";