diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-05-28 11:06:50 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-05-28 12:05:16 +0200 |
commit | 410f79ecb5a0f67742522e20ccc46fb74bdf1ea5 (patch) | |
tree | dd477c4a8d434c6b1894e915d8b17a24adcbe179 /sonar-plugin-api/src/test/java/org/sonar/api/utils/command | |
parent | 2f5e5a2d0a7570318cf708273ce902d36d43de40 (diff) | |
download | sonarqube-410f79ecb5a0f67742522e20ccc46fb74bdf1ea5.tar.gz sonarqube-410f79ecb5a0f67742522e20ccc46fb74bdf1ea5.zip |
Enable CommandExecutor tests
Diffstat (limited to 'sonar-plugin-api/src/test/java/org/sonar/api/utils/command')
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/utils/command/CommandExecutorTest.java | 11 |
1 files 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 |