HBASE-5726 TestSplitTransactionOnCluster occasionally failing

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1347852 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2012-06-08 01:07:25 +00:00
parent bf5cd8abac
commit 1a7924a2c3
1 changed files with 4 additions and 1 deletions

View File

@ -320,7 +320,10 @@ public class TestSplitTransactionOnCluster {
// Now split. // Now split.
split(hri, server, regionCount); split(hri, server, regionCount);
// Get daughters // Get daughters
List<HRegion> daughters = cluster.getRegions(tableName); List<HRegion> daughters;
do {
daughters = cluster.getRegions(tableName);
} while (daughters.size() < 2);
assertTrue(daughters.size() >= 2); assertTrue(daughters.size() >= 2);
// Now split one of the daughters. // Now split one of the daughters.
regionCount = ProtobufUtil.getOnlineRegions(server).size(); regionCount = ProtobufUtil.getOnlineRegions(server).size();