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:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user