提交 4cc2f98d 编写于 作者: F fjy

Merge pull request #537 from metamx/remove-initial-delay-polling

remove initial delay from polling
...@@ -106,7 +106,7 @@ public class DatabaseSegmentManager ...@@ -106,7 +106,7 @@ public class DatabaseSegmentManager
final Duration delay = config.get().getPollDuration().toStandardDuration(); final Duration delay = config.get().getPollDuration().toStandardDuration();
ScheduledExecutors.scheduleWithFixedDelay( ScheduledExecutors.scheduleWithFixedDelay(
exec, exec,
delay, new Duration(0),
delay, delay,
new Runnable() new Runnable()
{ {
......
...@@ -106,7 +106,7 @@ public class DatabaseSegmentManagerTest ...@@ -106,7 +106,7 @@ public class DatabaseSegmentManagerTest
@Test @Test
public void testPoll() public void testPoll()
{ {
EasyMock.expect(dbi.withHandle(EasyMock.<HandleCallback>anyObject())).andReturn(testRows); EasyMock.expect(dbi.withHandle(EasyMock.<HandleCallback>anyObject())).andReturn(testRows).times(2);
EasyMock.replay(dbi); EasyMock.replay(dbi);
manager.start(); manager.start();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册