accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject git commit: ACCUMULO-2913 Add more scaling timeouts
Date Fri, 26 Sep 2014 17:50:47 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master 15ca1007a -> f9993185d


ACCUMULO-2913 Add more scaling timeouts


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

Branch: refs/heads/master
Commit: f9993185d2fa20ad85a43a579b3db8bceaa420af
Parents: 15ca100
Author: Josh Elser <elserj@apache.org>
Authored: Fri Sep 26 13:47:51 2014 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Fri Sep 26 13:47:51 2014 -0400

----------------------------------------------------------------------
 .../test/replication/CyclicReplicationIT.java    | 11 ++++++++++-
 .../accumulo/test/replication/ReplicationIT.java |  2 +-
 .../UnorderedWorkAssignerReplicationIT.java      | 19 ++++++++++++-------
 3 files changed, 23 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/f9993185/test/src/test/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
b/test/src/test/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
index bc2ccdf..93c8650 100644
--- a/test/src/test/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
@@ -67,7 +67,16 @@ public class CyclicReplicationIT {
   private static final Logger log = LoggerFactory.getLogger(CyclicReplicationIT.class);
 
   @Rule
-  public Timeout timeout = new Timeout(5 * 60 * 1000);
+  public Timeout getTimeout() {
+    int scalingFactor = 1;
+    try {
+      scalingFactor = Integer.parseInt(System.getProperty("timeout.factor"));
+    } catch (NumberFormatException exception) {
+      log.warn("Could not parse timeout.factor, not scaling timeout");
+    }
+    
+    return new Timeout(scalingFactor * 5 * 60 * 1000);
+  }
 
   @Rule
   public TestName testName = new TestName();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f9993185/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java b/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java
index fb2a9e4..e8312df 100644
--- a/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java
@@ -554,7 +554,7 @@ public class ReplicationIT extends ConfigurableMacIT {
     Assert.assertEquals(expected, actual);
   }
 
-  @Test(timeout = 60 * 1000)
+  @Test
   public void noDeadlock() throws Exception {
     final Connector conn = getConnector();
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f9993185/test/src/test/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
b/test/src/test/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
index 0fb6044..a4d6179 100644
--- a/test/src/test/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
@@ -93,6 +93,11 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacIT
{
   }
 
   @Override
+  public int defaultTimeoutSeconds() {
+    return 60 * 5;
+  }
+
+  @Override
   public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) {
     cfg.setNumTservers(1);
     cfg.setProperty(Property.TSERV_WALOG_MAX_SIZE, "2M");
@@ -146,7 +151,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacIT
{
     }
   }
 
-  @Test(timeout = 60 * 5000)
+  @Test
   public void dataWasReplicatedToThePeer() throws Exception {
     MiniAccumuloConfigImpl peerCfg = new MiniAccumuloConfigImpl(createTestDir(this.getClass().getName()
+ "_" + this.testName.getMethodName() + "_peer"),
         ROOT_PASSWORD);
@@ -195,7 +200,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacIT
{
       connMaster.tableOperations().setProperty(masterTable, Property.TABLE_REPLICATION.getKey(),
"true");
       connMaster.tableOperations().setProperty(masterTable, Property.TABLE_REPLICATION_TARGET.getKey()
+ peerClusterName, peerTableId);
 
-      // Wait for zookeeper updates (configuration) to propogate
+      // Wait for zookeeper updates (configuration) to propagate
       UtilWaitThread.sleep(3 * 1000);
 
       // Write some data to table1
@@ -299,7 +304,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacIT
{
     }
   }
 
-  @Test(timeout = 60 * 5000)
+  @Test
   public void dataReplicatedToCorrectTable() throws Exception {
     MiniAccumuloConfigImpl peerCfg = new MiniAccumuloConfigImpl(createTestDir(this.getClass().getName()
+ "_" + this.testName.getMethodName() + "_peer"),
         ROOT_PASSWORD);
@@ -461,7 +466,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacIT
{
     }
   }
 
-  @Test(timeout = 60 * 5000)
+  @Test
   public void dataWasReplicatedToThePeerWithoutDrain() throws Exception {
     MiniAccumuloConfigImpl peerCfg = new MiniAccumuloConfigImpl(createTestDir(this.getClass().getName()
+ "_" + this.testName.getMethodName() + "_peer"),
         ROOT_PASSWORD);
@@ -558,7 +563,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacIT
{
     peerCluster.stop();
   }
 
-  @Test(timeout = 60 * 5000)
+  @Test
   public void dataReplicatedToCorrectTableWithoutDrain() throws Exception {
     MiniAccumuloConfigImpl peerCfg = new MiniAccumuloConfigImpl(createTestDir(this.getClass().getName()
+ "_" + this.testName.getMethodName() + "_peer"),
         ROOT_PASSWORD);
@@ -621,7 +626,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacIT
{
       connMaster.tableOperations().setProperty(masterTable2, Property.TABLE_REPLICATION.getKey(),
"true");
       connMaster.tableOperations().setProperty(masterTable2, Property.TABLE_REPLICATION_TARGET.getKey()
+ peerClusterName, peerTableId2);
 
-      // Wait for zookeeper updates (configuration) to propogate
+      // Wait for zookeeper updates (configuration) to propagate
       UtilWaitThread.sleep(3 * 1000);
 
       // Write some data to table1
@@ -665,7 +670,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacIT
{
       // Wait until we fully replicated something
       boolean fullyReplicated = false;
       for (int i = 0; i < 10 && !fullyReplicated; i++) {
-        UtilWaitThread.sleep(2000);
+        UtilWaitThread.sleep(timeoutFactor * 2000);
 
         Scanner s = ReplicationTable.getScanner(connMaster);
         WorkSection.limit(s);


Mime
View raw message