use of com.dangdang.ddframe.job.fixture.job.TestDataflowJob in project elastic-job by dangdangdotcom.
the class JobExecutorFactoryTest method assertGetJobExecutorForDataflowJob.
@Test
public void assertGetJobExecutorForDataflowJob() {
when(jobFacade.getShardingContexts()).thenReturn(new ShardingContexts("fake_task_id", "dataflow_test_job", 10, "", Collections.<Integer, String>emptyMap()));
when(jobFacade.loadJobRootConfiguration(true)).thenReturn(new TestDataflowJobConfiguration(false));
assertThat(JobExecutorFactory.getJobExecutor(new TestDataflowJob(null), jobFacade), instanceOf(DataflowJobExecutor.class));
}
use of com.dangdang.ddframe.job.fixture.job.TestDataflowJob in project elastic-job by dangdangdotcom.
the class DataflowJobExecutorTest method setUp.
private void setUp(final boolean isStreamingProcess, final ShardingContexts shardingContexts) {
this.shardingContexts = shardingContexts;
when(jobFacade.loadJobRootConfiguration(true)).thenReturn(new TestDataflowJobConfiguration(isStreamingProcess));
when(jobFacade.getShardingContexts()).thenReturn(shardingContexts);
dataflowJobExecutor = new DataflowJobExecutor(new TestDataflowJob(jobCaller), jobFacade);
ElasticJobVerify.prepareForIsNotMisfire(jobFacade, shardingContexts);
}
Aggregations