File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
spring-batch-core/src/test/java/org/springframework/batch/core/job/builder Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,15 @@ void testBuildSingleFlow() {
143143 assertEquals (2 , execution .getStepExecutions ().size ());
144144 }
145145
146+ @ Test
147+ void testBuildSingleFlowAddingStepsViaNext () {
148+ Flow flow = new FlowBuilder <Flow >("subflow" ).next (step1 ).next (step2 ).build ();
149+ FlowJobBuilder builder = new JobBuilder ("flow" , jobRepository ).start (flow ).end ().preventRestart ();
150+ builder .build ().execute (execution );
151+ assertEquals (BatchStatus .COMPLETED , execution .getStatus ());
152+ assertEquals (2 , execution .getStepExecutions ().size ());
153+ }
154+
146155 @ Test
147156 void testBuildOverTwoLines () {
148157 FlowJobBuilder builder = new JobBuilder ("flow" , jobRepository ).start (step1 ).on ("COMPLETED" ).to (step2 ).end ();
You can’t perform that action at this time.
0 commit comments