You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2012/12/17 21:07:33 UTC

svn commit: r1423115 - /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java

Author: stack
Date: Mon Dec 17 20:07:33 2012
New Revision: 1423115

URL: http://svn.apache.org/viewvc?rev=1423115&view=rev
Log:
HBASE-7338 Fix flaky condition for org.apache.hadoop.hbase.TestRegionRebalancing.testRebalanceOnRegionServerNumberChange

Modified:
    hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java

Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java?rev=1423115&r1=1423114&r2=1423115&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java (original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java Mon Dec 17 20:07:33 2012
@@ -218,9 +218,10 @@ public class TestRegionRebalancing {
    * Wait until all the regions are assigned.
    */
   private void waitForAllRegionsAssigned() throws IOException {
-    while (getRegionCount() < 22) {
+    int totalRegions = HBaseTestingUtility.KEYS.length+2;
+    while (getRegionCount() < totalRegions) {
     // while (!cluster.getMaster().allRegionsAssigned()) {
-      LOG.debug("Waiting for there to be 22 regions, but there are " + getRegionCount() + " right now.");
+      LOG.debug("Waiting for there to be "+ totalRegions +" regions, but there are " + getRegionCount() + " right now.");
       try {
         Thread.sleep(200);
       } catch (InterruptedException e) {}