From 3053f49605565ed521a140ea7a335f7d907cc86d Mon Sep 17 00:00:00 2001 From: dsyer Date: Tue, 12 Jan 2010 17:34:21 +0000 Subject: [PATCH] Allow a longer timeout on stopping background job --- .../configuration/xml/SplitInterruptedJobParserTests.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/SplitInterruptedJobParserTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/SplitInterruptedJobParserTests.java index 55c411ed7..277869fc9 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/SplitInterruptedJobParserTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/SplitInterruptedJobParserTests.java @@ -48,6 +48,10 @@ public class SplitInterruptedJobParserTests extends AbstractJobParserTests { Thread.sleep(100L); jobExecution.setStatus(BatchStatus.STOPPING); Thread.sleep(200L); + int count = 0; + while(jobExecution.getStatus()==BatchStatus.STOPPING && count++<10) { + Thread.sleep(200L); + } assertEquals(BatchStatus.STOPPED, jobExecution.getStatus()); assertEquals(ExitStatus.STOPPED.getExitCode(), jobExecution.getExitStatus().getExitCode());