diff --git a/src/test/java/com/sonyericsson/jenkins/plugins/bfa/model/FailureCauseProjectActionHudsonTest.java b/src/test/java/com/sonyericsson/jenkins/plugins/bfa/model/FailureCauseProjectActionHudsonTest.java index 3f5b4f02..32909655 100644 --- a/src/test/java/com/sonyericsson/jenkins/plugins/bfa/model/FailureCauseProjectActionHudsonTest.java +++ b/src/test/java/com/sonyericsson/jenkins/plugins/bfa/model/FailureCauseProjectActionHudsonTest.java @@ -25,12 +25,12 @@ import hudson.Functions; import hudson.model.FreeStyleProject; +import hudson.tasks.BatchFile; import hudson.tasks.Shell; import org.junit.Test; import org.jvnet.hudson.test.HudsonTestCase; -import static org.junit.Assume.assumeFalse; /** * Test Failure Cause project action. */ @@ -43,9 +43,10 @@ public class FailureCauseProjectActionHudsonTest extends HudsonTestCase { */ @Test public void testShowLastFailureOnProjectPage() throws Exception { - assumeFalse(Functions.isWindows()); FreeStyleProject project = createFreeStyleProject(); - project.getBuildersList().add(new Shell("test $BUILD_NUMBER -eq 2")); + project.getBuildersList().add(Functions.isWindows() + ? new BatchFile("@if %BUILD_NUMBER%==2 exit /b 1") + : new Shell("test $BUILD_NUMBER -eq 2")); project.scheduleBuild2(0).get(); FailureCauseProjectAction action = project.getAction(FailureCauseProjectAction.class);