Fix JobOperatorTests.testJobOperatorGetRunningJobInstancesException TCK test

* Throw a NoSuchJobException in the event no running job executions are found when calling getRunningExecutions(String name)
This commit is contained in:
Chris Schaefer
2013-09-04 19:32:03 -04:00
parent fba258c8e5
commit 46f790eb4b

View File

@@ -342,6 +342,10 @@ public class JsrJobOperator implements JobOperator {
List<Long> results = new ArrayList<Long>(findRunningJobExecutions.size());
if(results.isEmpty()) {
throw new NoSuchJobException("Job name: " + name + " not found.");
}
for (org.springframework.batch.core.JobExecution jobExecution : findRunningJobExecutions) {
results.add(jobExecution.getId());
}