]> source.dussan.org Git - sonarqube.git/commitdiff
Enable CommandExecutor tests
authorJulien HENRY <julien.henry@sonarsource.com>
Thu, 28 May 2015 09:06:50 +0000 (11:06 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Thu, 28 May 2015 10:05:16 +0000 (12:05 +0200)
sonar-plugin-api/src/test/java/org/sonar/api/utils/command/CommandExecutorTest.java

index 3fb68f7fcd50daa3cca971167cdf5179c08805eb..39cdcfb375dc45ac988cf089710a27d001fd706b 100644 (file)
@@ -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