hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeffr...@apache.org
Subject svn commit: r1530732 - /hbase/trunk/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
Date Wed, 09 Oct 2013 17:52:46 GMT
Author: jeffreyz
Date: Wed Oct  9 17:52:46 2013
New Revision: 1530732

URL: http://svn.apache.org/r1530732
Log:
HBASE-9723: TestAsyncProcess#testFailAndSuccess & testThreadCreation are flaky on SUSE

Modified:
    hbase/trunk/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java

Modified: hbase/trunk/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java?rev=1530732&r1=1530731&r2=1530732&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
(original)
+++ hbase/trunk/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
Wed Oct  9 17:52:46 2013
@@ -109,6 +109,13 @@ public class TestAsyncProcess {
         @Override
         public MultiResponse callWithoutRetries( RetryingCallable<MultiResponse> callable)
         throws IOException, RuntimeException {
+          try {
+            // sleep one second in order for threadpool to start another thread instead of
reusing
+            // existing one. 
+            Thread.sleep(1000);
+          } catch (InterruptedException e) {
+            // ignore error
+          }
           return mr;
         }
       };
@@ -382,6 +389,8 @@ public class TestAsyncProcess {
     while (!ap.hasError()) {
       Thread.sleep(1);
     }
+    ap.waitUntilDone();
+ 
     Assert.assertEquals(mcb.successCalled.get(), 2);
     Assert.assertEquals(mcb.retriableFailure.get(), 2);
     Assert.assertEquals(mcb.failureCalled.get(), 1);



Mime
View raw message