HBASE-18071 Fix flaky test TestStochasticLoadBalancer#testBalanceCluster
Test was failing on clusters with large number of servers or regions. Using commonly using config settings like some other tests seems to work. Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
parent
5c728b0f0c
commit
8b70d043e4
|
@ -118,7 +118,10 @@ public class TestStochasticLoadBalancer extends BalancerTestBase {
|
|||
*/
|
||||
@Test
|
||||
public void testBalanceCluster() throws Exception {
|
||||
|
||||
conf.setLong(StochasticLoadBalancer.MAX_STEPS_KEY, 2000000L);
|
||||
conf.setLong("hbase.master.balancer.stochastic.maxRunningTime", 90 * 1000); // 90 sec
|
||||
conf.setFloat("hbase.master.balancer.stochastic.maxMovePercent", 1.0f);
|
||||
loadBalancer.setConf(conf);
|
||||
for (int[] mockCluster : clusterStateMocks) {
|
||||
Map<ServerName, List<HRegionInfo>> servers = mockClusterServers(mockCluster);
|
||||
List<ServerAndLoad> list = convertToList(servers);
|
||||
|
|
Loading…
Reference in New Issue