From daeecbfd6eedd084371e17ac8e6da064af26759a Mon Sep 17 00:00:00 2001 From: cesaralves Date: Wed, 17 Apr 2013 18:30:17 +0200 Subject: [PATCH] Merge pull request #164 from cesaralves/patch-2 --- .../tasklet/SystemCommandTaskletIntegrationTests.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/step/tasklet/SystemCommandTaskletIntegrationTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/step/tasklet/SystemCommandTaskletIntegrationTests.java index dcb3e9aa1..ff692f571 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/step/tasklet/SystemCommandTaskletIntegrationTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/step/tasklet/SystemCommandTaskletIntegrationTests.java @@ -103,7 +103,9 @@ public class SystemCommandTaskletIntegrationTests { */ @Test public void testExecuteTimeout() throws Exception { - String command = "sleep 3"; + String command = System.getProperty("os.name").toLowerCase().indexOf("win") >= 0 ? + "ping 1.1.1.1 -n 1 -w 3000" : + "sleep 3"; tasklet.setCommand(command); tasklet.setTimeout(10); tasklet.afterPropertiesSet(); @@ -123,7 +125,9 @@ public class SystemCommandTaskletIntegrationTests { */ @Test public void testInterruption() throws Exception { - String command = "sleep 5"; + String command = System.getProperty("os.name").toLowerCase().indexOf("win") >= 0 ? + "ping 1.1.1.1 -n 1 -w 5000" : + "sleep 5"; tasklet.setCommand(command); tasklet.setTerminationCheckInterval(10); tasklet.afterPropertiesSet();