hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject svn commit: r1369363 - /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java
Date Sat, 04 Aug 2012 16:40:39 GMT
Author: jxiang
Date: Sat Aug  4 16:40:38 2012
New Revision: 1369363

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

Modified:
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java?rev=1369363&r1=1369362&r2=1369363&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java
Sat Aug  4 16:40:38 2012
@@ -312,6 +312,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