hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecl...@apache.org
Subject svn commit: r1523816 - /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/trace/TestHTraceHooks.java
Date Mon, 16 Sep 2013 21:22:35 GMT
Author: eclark
Date: Mon Sep 16 21:22:34 2013
New Revision: 1523816

URL: http://svn.apache.org/r1523816
Log:
HBASE-9366 TestHTraceHooks.testTraceCreateTable errors out sometimes.

Modified:
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/trace/TestHTraceHooks.java

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/trace/TestHTraceHooks.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/trace/TestHTraceHooks.java?rev=1523816&r1=1523815&r2=1523816&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/trace/TestHTraceHooks.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/trace/TestHTraceHooks.java
Mon Sep 16 21:22:34 2013
@@ -25,6 +25,7 @@ import java.util.Collection;
 
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.MediumTests;
+import org.apache.hadoop.hbase.Waiter;
 import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.client.Put;
 import org.cloudera.htrace.Sampler;
@@ -71,6 +72,15 @@ public class TestHTraceHooks {
       tableCreationSpan.close();
     }
 
+    // Some table creation is async.  Need to make sure that everything is full in before
+    // checking to see if the spans are there.
+    TEST_UTIL.waitFor(1000, new Waiter.Predicate<Exception>() {
+      @Override
+      public boolean evaluate() throws Exception {
+        return rcvr.getSpans().size() >= 5;
+      }
+    });
+
     Collection<Span> spans = rcvr.getSpans();
     TraceTree traceTree = new TraceTree(spans);
     Collection<Span> roots = traceTree.getRoots();



Mime
View raw message