hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject svn commit: r1503387 - /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
Date Mon, 15 Jul 2013 18:07:57 GMT
Author: jxiang
Date: Mon Jul 15 18:07:57 2013
New Revision: 1503387

URL: http://svn.apache.org/r1503387
Log:
HBASE-8662 [rest] support impersonation - ADDENDUM 2

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

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java?rev=1503387&r1=1503386&r2=1503387&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
Mon Jul 15 18:07:57 2013
@@ -2096,7 +2096,12 @@ public class HBaseTestingUtility extends
    */
   public void waitTableAvailable(byte[] table)
       throws InterruptedException, IOException {
-    waitTableAvailable(table, 30000);
+    waitTableAvailable(getHBaseAdmin(), table, 30000);
+  }
+
+  public void waitTableAvailable(HBaseAdmin admin, byte[] table)
+      throws InterruptedException, IOException {
+    waitTableAvailable(admin, table, 30000);
   }
 
   /**
@@ -2108,8 +2113,13 @@ public class HBaseTestingUtility extends
    */
   public void waitTableAvailable(byte[] table, long timeoutMillis)
   throws InterruptedException, IOException {
+    waitTableAvailable(getHBaseAdmin(), table, timeoutMillis);
+  }
+
+  public void waitTableAvailable(HBaseAdmin admin, byte[] table, long timeoutMillis)
+  throws InterruptedException, IOException {
     long startWait = System.currentTimeMillis();
-    while (!getHBaseAdmin().isTableAvailable(table)) {
+    while (!admin.isTableAvailable(table)) {
       assertTrue("Timed out waiting for table to become available " +
         Bytes.toStringBinary(table),
         System.currentTimeMillis() - startWait < timeoutMillis);
@@ -2153,7 +2163,7 @@ public class HBaseTestingUtility extends
   public void waitTableEnabled(HBaseAdmin admin, byte[] table, long timeoutMillis)
   throws InterruptedException, IOException {
     long startWait = System.currentTimeMillis();
-    waitTableAvailable(table, timeoutMillis);
+    waitTableAvailable(admin, table, timeoutMillis);
     long remainder = System.currentTimeMillis() - startWait;
     while (!admin.isTableEnabled(table)) {
       assertTrue("Timed out waiting for table to become available and enabled " +



Mime
View raw message