remove initial delay from polling

remove initial delay from polling in coordinator, this will help in the
cases when the pollDuration is set to higher than coordinator
startDelay.
This commit is contained in:
nishantmonu51 2014-05-09 23:33:00 +05:30
parent 48ae84ed56
commit 6be6337ab0
2 changed files with 2 additions and 1 deletions

View File

@ -106,7 +106,7 @@ public class DatabaseSegmentManager
final Duration delay = config.get().getPollDuration().toStandardDuration();
ScheduledExecutors.scheduleWithFixedDelay(
exec,
delay,
new Duration(0),
delay,
new Runnable()
{

View File

@ -106,6 +106,7 @@ public class DatabaseSegmentManagerTest
@Test
public void testPoll()
{
EasyMock.expect(dbi.withHandle(EasyMock.<HandleCallback>anyObject())).andReturn(testRows);
EasyMock.expect(dbi.withHandle(EasyMock.<HandleCallback>anyObject())).andReturn(testRows);
EasyMock.replay(dbi);