HBASE-7338 Fix flaky condition for org.apache.hadoop.hbase.TestRegionRebalancing.testRebalanceOnRegionServerNumberChange (Himanshu)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1421444 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e23ba9b3ce
commit
3b23a837af
|
@ -91,7 +91,7 @@ public class TestRegionRebalancing {
|
|||
* @throws IOException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@Test
|
||||
@Test (timeout=300000)
|
||||
public void testRebalanceOnRegionServerNumberChange()
|
||||
throws IOException, InterruptedException {
|
||||
HBaseAdmin admin = new HBaseAdmin(UTIL.getConfiguration());
|
||||
|
@ -234,9 +234,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) {}
|
||||
|
|
Loading…
Reference in New Issue