hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmhs...@apache.org
Subject svn commit: r1392457 - in /hbase/branches/0.92: CHANGES.txt src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java
Date Mon, 01 Oct 2012 17:33:33 GMT
Author: jmhsieh
Date: Mon Oct  1 17:33:33 2012
New Revision: 1392457

URL: http://svn.apache.org/viewvc?rev=1392457&view=rev
Log:
HBASE-6906 TestHBaseFsck#testQuarantine* tests are flakey due to TestNotEnabledException

Modified:
    hbase/branches/0.92/CHANGES.txt
    hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java

Modified: hbase/branches/0.92/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1392457&r1=1392456&r2=1392457&view=diff
==============================================================================
--- hbase/branches/0.92/CHANGES.txt (original)
+++ hbase/branches/0.92/CHANGES.txt Mon Oct  1 17:33:33 2012
@@ -4,6 +4,7 @@ Release 0.92.3 - Unreleased
    HBASE-6649  [0.92 UNIT TESTS] TestReplication.queueFailover occasionally fails [Part-1]
                (Devaraj Das via Stack)
    HBASE-6847  HBASE-6649 broke replication (Devaraj Das via JD)
+   HBASE-6906  TestHBaseFsck#testQuarantine* tests are flakey due to TableNotEnabledException
 
   IMPROVEMENTS
 

Modified: hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java?rev=1392457&r1=1392456&r2=1392457&view=diff
==============================================================================
--- hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java (original)
+++ hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java Mon
Oct  1 17:33:33 2012
@@ -1372,6 +1372,9 @@ public class TestHBaseFsck {
     }
   }
 
+  /**
+  * Test that use this should have a timeout, because this method could potentially wait
forever.
+  */
   private void doQuarantineTest(String table, HBaseFsck hbck, int check, int corrupt, int
fail,
       int quar, int missing) throws Exception {
     try {
@@ -1394,7 +1397,16 @@ public class TestHBaseFsck {
       assertEquals(hfcc.getMissing().size(), missing);
 
       // its been fixed, verify that we can enable
-      TEST_UTIL.getHBaseAdmin().enableTable(table);
+      HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
+      admin.enableTableAsync(table);
+      while (!admin.isTableEnabled(table)) {
+        try {
+          Thread.sleep(250);
+        } catch (InterruptedException e) {
+          e.printStackTrace();
+          fail("Interrupted when trying to enable table " + table);
+        }
+      }
     } finally {
       deleteTable(table);
     }



Mime
View raw message