Search in sources :

Example 1 with SchedulerService

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);
}
Also used : DatasetFramework(co.cask.cdap.data2.dataset2.DatasetFramework) SchedulerService(co.cask.cdap.internal.app.runtime.schedule.SchedulerService) Injector(com.google.inject.Injector) TransactionExecutorFactory(co.cask.cdap.data2.transaction.TransactionExecutorFactory) BeforeClass(org.junit.BeforeClass)

Aggregations

DatasetFramework (co.cask.cdap.data2.dataset2.DatasetFramework)1 TransactionExecutorFactory (co.cask.cdap.data2.transaction.TransactionExecutorFactory)1 SchedulerService (co.cask.cdap.internal.app.runtime.schedule.SchedulerService)1 Injector (com.google.inject.Injector)1 BeforeClass (org.junit.BeforeClass)1