use of co.cask.cdap.internal.app.runtime.schedule.SchedulerService in project cdap by caskdata.
the class DatasetBasedStreamSizeScheduleStoreTest method set.
@BeforeClass
public static void set() throws Exception {
Injector injector = AppFabricTestHelper.getInjector();
scheduleStore = injector.getInstance(DatasetBasedStreamSizeScheduleStore.class);
txExecutorFactory = injector.getInstance(TransactionExecutorFactory.class);
datasetFramework = injector.getInstance(DatasetFramework.class);
// this effectively waits for the relevant services to start up
final SchedulerService schedulerService = injector.getInstance(SchedulerService.class);
Tasks.waitFor(true, new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
return schedulerService.isRunning();
}
}, 10, TimeUnit.SECONDS);
}
Aggregations