mirror of https://github.com/apache/druid.git
Test udpate
This commit is contained in:
parent
c2604657ed
commit
6e0590f97b
|
@ -74,7 +74,7 @@ public class CostBalancerStrategyTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void test() throws InterruptedException {
|
||||
public void testCostBalancerStrategy() throws InterruptedException {
|
||||
DataSegment segment = getSegment(1000);
|
||||
|
||||
CostBalancerStrategy strategy = new CostBalancerStrategy(DateTime.now(DateTimeZone.UTC));
|
||||
|
@ -83,4 +83,15 @@ public class CostBalancerStrategyTest
|
|||
Assert.assertEquals("Best Server should be BEST_SERVER", "BEST_SERVER", holder.getServer().getName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCostBalancerMultithreadStrategy() throws InterruptedException {
|
||||
DataSegment segment = getSegment(1000);
|
||||
|
||||
CostBalancerStrategy strategy = new CostBalancerStrategy(DateTime.now(DateTimeZone.UTC));
|
||||
ServerHolder holder = strategy.findNewSegmentHomeReplicator(segment, serverHolderList);
|
||||
Assert.assertNotNull("Should be able to find a place for new segment!!", holder);
|
||||
Assert.assertEquals("Best Server should be BEST_SERVER", "BEST_SERVER", holder.getServer().getName());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -95,6 +95,12 @@ public class DruidCoordinatorTest
|
|||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCoordinatorBalancerStrategy()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
},
|
||||
new ZkPathsConfig(){
|
||||
|
||||
|
|
Loading…
Reference in New Issue