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 D60B010723 for ; Thu, 11 Jul 2013 23:51:18 +0000 (UTC) Received: (qmail 41287 invoked by uid 500); 11 Jul 2013 23:51:18 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 41250 invoked by uid 500); 11 Jul 2013 23:51:18 -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 41243 invoked by uid 99); 11 Jul 2013 23:51:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jul 2013 23:51:18 +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; Thu, 11 Jul 2013 23:51:16 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4245E2388980; Thu, 11 Jul 2013 23:50:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1502398 - /hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java Date: Thu, 11 Jul 2013 23:50:55 -0000 To: commits@hbase.apache.org From: stack@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130711235055.4245E2388980@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: stack Date: Thu Jul 11 23:50:54 2013 New Revision: 1502398 URL: http://svn.apache.org/r1502398 Log: HBASE-8933 TestSplitTransactionOnCluster fails because "Region not moved off .META. server" Modified: hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java Modified: hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java?rev=1502398&r1=1502397&r2=1502398&view=diff ============================================================================== --- hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java (original) +++ hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java Thu Jul 11 23:50:54 2013 @@ -129,7 +129,28 @@ public class TestSplitTransactionOnClust private HRegionInfo getAndCheckSingleTableRegion(final List regions) { assertEquals(1, regions.size()); - return regions.get(0).getRegionInfo(); + HRegionInfo hri = regions.get(0).getRegionInfo(); + return waitOnRIT(hri); + } + + /** + * Often region has not yet fully opened. If we try to use it -- do a move for instance -- it + * will fail silently if the region is not yet opened. + * @param hri Region to check if in Regions In Transition... wait until out of transition before + * returning + * @return Passed in hri + */ + private HRegionInfo waitOnRIT(final HRegionInfo hri) { + // Close worked but we are going to open the region elsewhere. Before going on, make sure + // this completes. + while (TESTING_UTIL.getHBaseCluster().getMaster().getAssignmentManager(). + getRegionStates().isRegionInTransition(hri)) { + LOG.info("Waiting on region in transition: " + + TESTING_UTIL.getHBaseCluster().getMaster().getAssignmentManager().getRegionStates(). + getRegionTransitionState(hri)); + Threads.sleep(10); + } + return hri; } @Test(timeout = 60000) @@ -226,7 +247,7 @@ public class TestSplitTransactionOnClust throws IOException, InterruptedException, NodeExistsException, KeeperException, DeserializationException, ServiceException { final byte [] tableName = - Bytes.toBytes("ephemeral"); + Bytes.toBytes("testRSSplitEphemeralsDisappearButDaughtersAreOnlinedAfterShutdownHandling"); // Create table then get the single region for our new table. HTable t = createTableAndWait(tableName, HConstants.CATALOG_FAMILY);