use of com.thinkbiganalytics.jobrepo.query.model.ExecutedStep in project kylo by Teradata.
the class FeedWithConnectedReusableTemplateIT method assertExecutedJobs.
private void assertExecutedJobs(FeedMetadata feed) throws IOException {
DefaultExecutedJob[] jobs = getJobs(feed.getCategoryAndFeedName().toLowerCase());
DefaultExecutedJob ingest = Arrays.stream(jobs).findFirst().orElse(null);
Assert.assertNotNull(ingest);
Assert.assertEquals(ExecutionStatus.COMPLETED, ingest.getStatus());
Assert.assertEquals(ExitStatus.COMPLETED.getExitCode(), ingest.getExitCode());
LOG.info("Asserting user data jobs has expected number of steps");
DefaultExecutedJob job = getJobWithSteps(ingest.getExecutionId());
Assert.assertEquals(ingest.getExecutionId(), job.getExecutionId());
List<ExecutedStep> steps = job.getExecutedSteps();
Assert.assertEquals(8, steps.size());
for (ExecutedStep step : steps) {
Assert.assertEquals(ExitStatus.COMPLETED.getExitCode(), step.getExitCode());
}
}
use of com.thinkbiganalytics.jobrepo.query.model.ExecutedStep in project kylo by Teradata.
the class FeedIT method assertExecutedJobs.
public void assertExecutedJobs(String feedName, String feedId) throws IOException {
LOG.info("Asserting there are 2 completed jobs: userdata ingest job, index text service system jobs");
DefaultExecutedJob[] jobs = getJobs();
// TODO assert all executed jobs are successful
DefaultExecutedJob ingest = Arrays.stream(jobs).filter(job -> ("functional_tests." + feedName.toLowerCase()).equals(job.getFeedName())).findFirst().get();
Assert.assertEquals(ExecutionStatus.COMPLETED, ingest.getStatus());
Assert.assertEquals(ExitStatus.COMPLETED.getExitCode(), ingest.getExitCode());
LOG.info("Asserting user data jobs has expected number of steps");
DefaultExecutedJob job = getJobWithSteps(ingest.getExecutionId());
Assert.assertEquals(ingest.getExecutionId(), job.getExecutionId());
List<ExecutedStep> steps = job.getExecutedSteps();
Assert.assertEquals(21, steps.size());
for (ExecutedStep step : steps) {
Assert.assertEquals(ExitStatus.COMPLETED.getExitCode(), step.getExitCode());
}
LOG.info("Asserting number of total/valid/invalid rows");
Assert.assertEquals(1000, getTotalNumberOfRecords(feedId));
Assert.assertEquals(VALID_RESULTS, getNumberOfValidRecords(feedId));
Assert.assertEquals(121, getNumberOfInvalidRecords(feedId));
assertValidatorsAndStandardisers(feedId, feedName);
// TODO assert data via global search
assertHiveData(feedName);
}
Aggregations