Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C0FBA1096F for ; Mon, 15 Jul 2013 18:08:22 +0000 (UTC) Received: (qmail 62058 invoked by uid 500); 15 Jul 2013 18:08:22 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 62005 invoked by uid 500); 15 Jul 2013 18:08:22 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 61997 invoked by uid 99); 15 Jul 2013 18:08:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jul 2013 18:08:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jul 2013 18:08:18 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CB7E32388831; Mon, 15 Jul 2013 18:07:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@hbase.apache.org From: jxiang@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130715180757.CB7E32388831@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 " +