From 410f79ecb5a0f67742522e20ccc46fb74bdf1ea5 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Thu, 28 May 2015 11:06:50 +0200 Subject: [PATCH] Enable CommandExecutor tests --- .../sonar/api/utils/command/CommandExecutorTest.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/command/CommandExecutorTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/command/CommandExecutorTest.java index 3fb68f7fcd5..39cdcfb375d 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/command/CommandExecutorTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/command/CommandExecutorTest.java @@ -24,7 +24,6 @@ import java.io.IOException; import org.apache.commons.io.FileUtils; import org.apache.commons.lang.SystemUtils; import org.junit.Before; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; @@ -126,24 +125,22 @@ public class CommandExecutorTest { assertThat(log).contains("Environment variable: 2"); } - @Test(timeout = 3000L) - @Ignore + @Test(timeout = 6000L) public void should_stop_after_timeout() throws IOException { try { String executable = getScript("forever"); - CommandExecutor.create().execute(Command.create(executable).setDirectory(workDir), 300L); + CommandExecutor.create().execute(Command.create(executable).setDirectory(workDir), 1000L); fail(); } catch (TimeoutException e) { // ok } } - @Test(timeout = 3000L) - @Ignore + @Test(timeout = 6000L) public void should_stop_after_timeout_and_new_shell() throws IOException { try { String executable = getScript("forever"); - CommandExecutor.create().execute(Command.create(executable).setNewShell(true).setDirectory(workDir), 300L); + CommandExecutor.create().execute(Command.create(executable).setNewShell(true).setDirectory(workDir), 1000L); fail(); } catch (TimeoutException e) { // ok -- 2.39.5