use of com.dangdang.ddframe.job.cloud.scheduler.fixture.TaskNode in project elastic-job by dangdangdotcom.
the class FacadeServiceTest method assertRecordFailoverTaskWhenIsFailoverDisabled.
@Test
public void assertRecordFailoverTaskWhenIsFailoverDisabled() {
TaskNode taskNode = TaskNode.builder().type(ExecutionType.FAILOVER).build();
when(jobConfigService.load("test_job")).thenReturn(Optional.of(CloudJobConfigurationBuilder.createOtherCloudJobConfiguration("test_job")));
facadeService.recordFailoverTask(TaskContext.from(taskNode.getTaskNodeValue()));
verify(failoverService, times(0)).add(TaskContext.from(taskNode.getTaskNodeValue()));
}
Aggregations