BATCH-1507: double check the step names
This commit is contained in:
@@ -535,6 +535,21 @@ public class FlowJobTests {
|
||||
assertEquals("step", step.getName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetStepNamesWithPrefix() throws Exception {
|
||||
SimpleFlow flow = new SimpleFlow("job");
|
||||
List<StateTransition> transitions = new ArrayList<StateTransition>();
|
||||
transitions.add(StateTransition.createStateTransition(new StepState("job.step", new StubStep("step")), "end0"));
|
||||
transitions.add(StateTransition.createEndStateTransition(new EndState(FlowExecutionStatus.COMPLETED, "end0")));
|
||||
flow.setStateTransitions(transitions);
|
||||
flow.afterPropertiesSet();
|
||||
job.setFlow(flow);
|
||||
job.setName(flow.getName());
|
||||
job.afterPropertiesSet();
|
||||
|
||||
assertEquals("[step]", job.getStepNames().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetStepNotExists() throws Exception {
|
||||
SimpleFlow flow = new SimpleFlow("job");
|
||||
|
||||
Reference in New Issue
Block a user