From 1a67ebe861c197a0d84578f39655c6c2c651a2cb Mon Sep 17 00:00:00 2001 From: fjy Date: Mon, 29 Sep 2014 15:22:26 -0700 Subject: [PATCH] fix regression in test --- .../coordinator/DruidCoordinatorRuleRunnerTest.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/server/src/test/java/io/druid/server/coordinator/DruidCoordinatorRuleRunnerTest.java b/server/src/test/java/io/druid/server/coordinator/DruidCoordinatorRuleRunnerTest.java index 90a1b3da786..2aae37364ca 100644 --- a/server/src/test/java/io/druid/server/coordinator/DruidCoordinatorRuleRunnerTest.java +++ b/server/src/test/java/io/druid/server/coordinator/DruidCoordinatorRuleRunnerTest.java @@ -93,7 +93,7 @@ public class DruidCoordinatorRuleRunnerTest @After public void tearDown() throws Exception { - //EasyMock.verify(coordinator); + EasyMock.verify(coordinator); EasyMock.verify(databaseRuleManager); } @@ -492,12 +492,21 @@ public class DruidCoordinatorRuleRunnerTest @Test public void testDropRemove() throws Exception { - mockCoordinator(); mockPeon.dropSegment(EasyMock.anyObject(), EasyMock.anyObject()); EasyMock.expectLastCall().atLeastOnce(); EasyMock.expect(mockPeon.getSegmentsToLoad()).andReturn(Sets.newHashSet()).atLeastOnce(); EasyMock.expect(mockPeon.getLoadQueueSize()).andReturn(0L).atLeastOnce(); EasyMock.replay(mockPeon); + + EasyMock.expect(coordinator.getDynamicConfigs()).andReturn( + new CoordinatorDynamicConfig( + 0, 0, 0, 0, 1, 24, 0, false + ) + ).anyTimes(); + coordinator.removeSegment(EasyMock.anyObject()); + EasyMock.expectLastCall().atLeastOnce(); + EasyMock.replay(coordinator); + EasyMock.expect(databaseRuleManager.getRulesWithDefault(EasyMock.anyObject())).andReturn( Lists.newArrayList( new IntervalLoadRule(new Interval("2012-01-01T00:00:00.000Z/2012-01-01T12:00:00.000Z"), null, 1, "normal"),