use of com.thinkbiganalytics.scheduler.SimpleSchedulerQuartzJobBeanSetup in project kylo by Teradata.
the class SimpleSchedulerQuartzJobBeanSetupTest method test.
@Test
public void test() throws Exception {
SimpleSchedulerQuartzJobBeanSetup setup = new SimpleSchedulerQuartzJobBeanSetup();
setup.setQuartzScheduler(scheduler);
setup.setCronExpresson("cronExpression");
setup.setDataMap(new HashMap<String, Object>());
setup.setFireImmediately(false);
setup.setGroupName("groupName");
setup.setJobName("jobName");
setup.setQuartzJobBean(MockJob.class.getCanonicalName());
setup.scheduleMetadataJob();
setup.setQuartzJobBean("ignore.error.TestMissingClass");
setup.scheduleMetadataJob();
Mockito.mock(QuartzScheduler.class, new Answer() {
@Override
public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
throw new JobSchedulerException();
}
});
}
Aggregations