accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [6/7] git commit: ACCUMULO-3243 KeyValueEquality can inherit from SimpleMacIT to get timeout functionality
Date Mon, 20 Oct 2014 22:03:31 GMT
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 <elserj@apache.org>
Authored: Mon Oct 20 17:17:13 2014 -0400
Committer: Josh Elser <elserj@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";


Mime
View raw message