Author: liyin
Date: Wed Apr 23 18:18:18 2014
New Revision: 1589479

URL: http://svn.apache.org/r1589479
Log:
[Master] Make TestMiniClusterLoadParallel more stable

Author: liyintang

Summary: I have run through this unit test 10 times locally. The min execution 
time is 134.44 sec, the max is 162.576 sec and the avg is 148.917 sec.

Test Plan: Have run this test successfully more than 10 times locally.

Reviewers: daviddeng, rshroff

Reviewed By: rshroff

CC: hbase-dev@

Differential Revision: https://phabricator.fb.com/D1287762

Task ID: 4123414

Modified:
    
hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
    
hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/util/TestMiniClusterLoadParallel.java

Modified: 
hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
URL: 
http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java?rev=1589479&r1=1589478&r2=1589479&view=diff
==============================================================================
--- 
hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
 (original)
+++ 
hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
 Wed Apr 23 18:18:18 2014
@@ -16,16 +16,16 @@
  */
 package org.apache.hadoop.hbase.util;
 
-import java.io.IOException;
-import java.util.Collection;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.util.StringUtils;
 
+import java.io.IOException;
+import java.util.Collection;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+
 /**
  * Common base class for reader and writer parts of multi-thread HBase load
  * test ({@link LoadTestTool}).
@@ -181,6 +181,8 @@ public abstract class MultiThreadedActio
   public void waitForFinish() {
     while (numThreadsWorking.get() != 0) {
       Threads.sleepWithoutInterrupt(1000);
+      LOG.debug("Waiting for " + this.actionLetter + " actions to quit. Now 
there are " +
+        numThreadsWorking.get() + " left.");
     }
   }
 

Modified: 
hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/util/TestMiniClusterLoadParallel.java
URL: 
http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/util/TestMiniClusterLoadParallel.java?rev=1589479&r1=1589478&r2=1589479&view=diff
==============================================================================
--- 
hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/util/TestMiniClusterLoadParallel.java
 (original)
+++ 
hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/util/TestMiniClusterLoadParallel.java
 Wed Apr 23 18:18:18 2014
@@ -16,13 +16,13 @@
  */
 package org.apache.hadoop.hbase.util;
 
-import static org.junit.Assert.assertEquals;
-
 import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
+import static org.junit.Assert.assertEquals;
+
 /**
  * A write/read/verify load test on a mini HBase cluster. Tests reading
  * and writing at the same time.
@@ -36,7 +36,7 @@ public class TestMiniClusterLoadParallel
     super(isMultiPut, encoding);
   }
 
-  @Test(timeout=TIMEOUT_MS)
+  @Test(timeout=200000)
   public void loadTest() throws Exception {
     prepareForLoadTest();
 


Reply via email to