use of pipelite.entity.ScheduleEntity in project pipelite by enasequence.
the class ScheduleRunnerTest method deleteSchedule.
private void deleteSchedule(TestSchedule testSchedule) {
ScheduleEntity schedule = new ScheduleEntity();
schedule.setPipelineName(testSchedule.pipelineName());
scheduleService.delete(schedule);
System.out.println("deleted schedule for pipeline: " + testSchedule.pipelineName());
}
use of pipelite.entity.ScheduleEntity in project pipelite by enasequence.
the class ScheduleEntityAsserter method assertCompletedScheduleEntity.
public static void assertCompletedScheduleEntity(ScheduleService scheduleService, TestType testType, String serviceName, String pipelineName, int processCnt, Collection<String> processIds) {
ScheduleEntity scheduleEntity = scheduleService.getSavedSchedule(pipelineName).get();
assertThat(scheduleEntity.getServiceName()).isEqualTo(serviceName);
assertThat(scheduleEntity.getPipelineName()).isEqualTo(pipelineName);
assertThat(scheduleEntity.getProcessId()).isEqualTo(Iterables.getLast(processIds));
assertThat(scheduleEntity.getExecutionCount()).isEqualTo(processCnt);
assertThat(scheduleEntity.getStartTime()).isNotNull();
assertThat(scheduleEntity.getEndTime()).isAfterOrEqualTo(scheduleEntity.getStartTime());
if (testType.expectedStageSuccessCnt() > 0) {
assertThat(scheduleEntity.getLastFailed()).isNull();
assertThat(scheduleEntity.getLastCompleted()).isAfterOrEqualTo(scheduleEntity.getStartTime());
assertThat(scheduleEntity.getStreakFailed()).isEqualTo(0);
assertThat(scheduleEntity.getStreakCompleted()).isEqualTo(processCnt);
} else {
assertThat(scheduleEntity.getLastFailed()).isAfterOrEqualTo(scheduleEntity.getStartTime());
assertThat(scheduleEntity.getLastCompleted()).isNull();
assertThat(scheduleEntity.getStreakFailed()).isEqualTo(processCnt);
assertThat(scheduleEntity.getStreakCompleted()).isEqualTo(0);
}
}
Aggregations