From 8898975a1e8e90f394c02a06b9cf023101eea113 Mon Sep 17 00:00:00 2001 From: dsyer Date: Mon, 16 Nov 2009 10:28:57 +0000 Subject: [PATCH] Account for differences between step names in SimpleJob and FlowJob --- .../org/springframework/batch/test/AbstractJobTests.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-batch-test/src/main/java/org/springframework/batch/test/AbstractJobTests.java b/spring-batch-test/src/main/java/org/springframework/batch/test/AbstractJobTests.java index 7437014fb..f740baf81 100644 --- a/spring-batch-test/src/main/java/org/springframework/batch/test/AbstractJobTests.java +++ b/spring-batch-test/src/main/java/org/springframework/batch/test/AbstractJobTests.java @@ -211,7 +211,10 @@ public abstract class AbstractJobTests implements ApplicationContextAware { * @return JobExecution */ public JobExecution launchStep(String stepName, JobParameters jobParameters, ExecutionContext jobExecutionContext) { - Step step = this.job.getStep(job.getName()+"."+stepName); + Step step = this.job.getStep(stepName); + if (step == null) { + step = this.job.getStep(this.job.getName() + "." + stepName); + } if (step == null) { throw new IllegalStateException("No Step found with name: [" + stepName + "]"); }