From 4287f5a2ce78fc449fa601c689dafa29c0512612 Mon Sep 17 00:00:00 2001 From: Michael Minella Date: Fri, 2 Aug 2019 21:28:49 -0500 Subject: [PATCH] Updated to address DecisionStepTests#testDecisionAfterSplit occasional failure --- .../springframework/batch/core/jsr/step/DecisionStepTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/jsr/step/DecisionStepTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/jsr/step/DecisionStepTests.java index 39e35a2fb..0c1239853 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/jsr/step/DecisionStepTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/jsr/step/DecisionStepTests.java @@ -31,6 +31,7 @@ import org.springframework.batch.core.jsr.AbstractJsrTestCase; import org.springframework.beans.factory.config.AutowireCapableBeanFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; +import org.springframework.test.annotation.DirtiesContext; import org.springframework.util.Assert; import static org.junit.Assert.assertEquals; @@ -105,6 +106,7 @@ public class DecisionStepTests extends AbstractJsrTestCase { assertEquals(3, BatchRuntime.getJobOperator().getStepExecutions(execution.getExecutionId()).size()); } + @DirtiesContext(methodMode = DirtiesContext.MethodMode.BEFORE_METHOD) @Test public void testDecisionAfterSplit() throws Exception { JobExecution execution = runJob("DecisionStepTests-decisionAfterSplit-context", new Properties(), 10000L);