hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeffr...@apache.org
Subject svn commit: r1530736 - /hbase/branches/0.96/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
Date Wed, 09 Oct 2013 17:57:03 GMT
Author: jeffreyz
Date: Wed Oct  9 17:57:03 2013
New Revision: 1530736

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

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

Modified: hbase/branches/0.96/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java?rev=1530736&r1=1530735&r2=1530736&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
(original)
+++ hbase/branches/0.96/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
Wed Oct  9 17:57:03 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