1) Fix DatabaseSegmentManager so that Unit Test passes

This commit is contained in:
cheddar 2013-06-10 14:13:28 -07:00
parent 2f56c24259
commit 06f7e7e665
2 changed files with 6 additions and 6 deletions

View File

@ -103,10 +103,11 @@ public class DatabaseSegmentManager
return;
}
final Duration delay = config.get().getPollDuration().toStandardDuration();
ScheduledExecutors.scheduleWithFixedDelay(
exec,
new Duration(0),
config.get().getPollDuration().toStandardDuration(),
delay,
delay,
new Runnable()
{
@Override
@ -131,6 +132,7 @@ public class DatabaseSegmentManager
started = false;
dataSources.set(new ConcurrentHashMap<String, DruidDataSource>());
exec.shutdownNow();
}
}

View File

@ -94,10 +94,7 @@ public class DatabaseSegmentManagerTest
+ "\"twitterstream_2012-01-05T00:00:00.000Z_2012-01-06T00:00:00.000Z_2012-01-06T22:19:12.565Z\"}"
);
testRows = Arrays.<Map<String, Object>>asList(
map1,
map2
);
testRows = Arrays.<Map<String, Object>>asList(map1, map2);
}
@After
@ -114,5 +111,6 @@ public class DatabaseSegmentManagerTest
manager.start();
manager.poll();
manager.stop();
}
}