mirror of https://github.com/apache/druid.git
1) Fix DatabaseSegmentManager so that Unit Test passes
This commit is contained in:
parent
2f56c24259
commit
06f7e7e665
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue