Add test for adding steps to a Flow via "next"
Related to #4432
(cherry picked from commit 42dd1442dd)
This commit is contained in:
committed by
Mahmoud Ben Hassine
parent
adc3a422d4
commit
f40dd9fec1
@@ -142,6 +142,15 @@ class FlowJobBuilderTests {
|
||||
assertEquals(2, execution.getStepExecutions().size());
|
||||
}
|
||||
|
||||
@Test
|
||||
void testBuildSingleFlowAddingStepsViaNext() {
|
||||
Flow flow = new FlowBuilder<Flow>("subflow").next(step1).next(step2).build();
|
||||
FlowJobBuilder builder = new JobBuilder("flow", jobRepository).start(flow).end().preventRestart();
|
||||
builder.build().execute(execution);
|
||||
assertEquals(BatchStatus.COMPLETED, execution.getStatus());
|
||||
assertEquals(2, execution.getStepExecutions().size());
|
||||
}
|
||||
|
||||
@Test
|
||||
void testBuildOverTwoLines() {
|
||||
FlowJobBuilder builder = new JobBuilder("flow", jobRepository).start(step1).on("COMPLETED").to(step2).end();
|
||||
|
||||
Reference in New Issue
Block a user