@Override public Set<JobExecution> findRunningJobExecutions(String jobName) { Set<JobExecution> executions = jobExecutionDao.findRunningJobExecutions(jobName); for (JobExecution jobExecution : executions) { getJobExecutionDependencies(jobExecution); for (StepExecution stepExecution : jobExecution.getStepExecutions()) { getStepExecutionDependencies(stepExecution); } } return executions; }
/** * Check the execution is returned */ @Transactional @Test public void testNoRunningExecutions() { Set<JobExecution> values = dao.findRunningJobExecutions("no-such-job"); assertEquals(0, values.size()); }
@Test public void testFindRunningJobExecutions() throws Exception { StepExecution stepExecution = jobExecution.createStepExecution("step"); when(jobExecutionDao.findRunningJobExecutions("job")).thenReturn( Collections.singleton(jobExecution)); when(jobInstanceDao.getJobInstance(jobExecution)).thenReturn( jobInstance); stepExecutionDao.addStepExecutions(jobExecution); when(ecDao.getExecutionContext(jobExecution)).thenReturn(null); when(ecDao.getExecutionContext(stepExecution)).thenReturn(null); jobExplorer.findRunningJobExecutions("job"); }
Set<JobExecution> values = dao.findRunningJobExecutions(exec.getJobInstance().getJobName());
public Set<JobExecution> findRunningJobExecutions(String jobName) { Set<JobExecution> executions = jobExecutionDao .findRunningJobExecutions(jobName); for (JobExecution jobExecution : executions) { getJobExecutionDependencies(jobExecution); } return executions; }
@Override public Set<JobExecution> findRunningJobExecutions(String jobName) { Set<JobExecution> executions = jobExecutionDao.findRunningJobExecutions(jobName); for (JobExecution jobExecution : executions) { getJobExecutionDependencies(jobExecution); for (StepExecution stepExecution : jobExecution.getStepExecutions()) { getStepExecutionDependencies(stepExecution); } } return executions; }
@Override public Set<JobExecution> findRunningJobExecutions(String jobName) { Set<JobExecution> executions = jobExecutionDao.findRunningJobExecutions(jobName); for (JobExecution jobExecution : executions) { getJobExecutionDependencies(jobExecution); for (StepExecution stepExecution : jobExecution.getStepExecutions()) { getStepExecutionDependencies(stepExecution); } } return executions; }
@Override public Set<JobExecution> findRunningJobExecutions(String jobName) { Set<JobExecution> executions = jobExecutionDao.findRunningJobExecutions(jobName); for (JobExecution jobExecution : executions) { getJobExecutionDependencies(jobExecution); for (StepExecution stepExecution : jobExecution.getStepExecutions()) { getStepExecutionDependencies(stepExecution); } } return executions; }