hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject svn commit: r1369364 - /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java
Date Sat, 04 Aug 2012 16:41:04 GMT
Author: jxiang
Date: Sat Aug  4 16:41:03 2012
New Revision: 1369364

URL: http://svn.apache.org/viewvc?rev=1369364&view=rev
Log:
[hbck] TestHBaseFsck ran into TableNotEnabledException

Modified:
    hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java

Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java?rev=1369364&r1=1369363&r2=1369364&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java (original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java Sat
Aug  4 16:41:03 2012
@@ -304,6 +304,18 @@ public class TestHBaseFsck {
     }
     tbl.put(puts);
     tbl.flushCommits();
+    long endTime = System.currentTimeMillis() + 60000;
+    while (!TEST_UTIL.getHBaseAdmin().isTableEnabled(tablename)) {
+      try {
+        if (System.currentTimeMillis() > endTime) {
+          fail("Failed to enable table " + tablename + " after waiting for 60 sec");
+        }
+        Thread.sleep(100);
+      } catch (InterruptedException e) {
+        e.printStackTrace();
+        fail("Interrupted when waiting table " + tablename + " to be enabled");
+      }
+    }
     return tbl;
   }
 



Mime
View raw message