aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorJenkins CI <ci@sonarsource.com>2014-09-25 10:25:22 +0200
committerJenkins CI <ci@sonarsource.com>2014-09-25 10:25:22 +0200
commit5e767fe7053bcdd4b7d63fd6af80305c790fb5ae (patch)
tree2896ea1ed0e36c103d9bbec49ee7a456ebc269e7 /sonar-plugin-api
parenta813b87b35008962ce53b8629804c86f236fb8ab (diff)
parent3cf0930f7f5ef287310a4a33b9c4f2fbdcbb1c4d (diff)
downloadsonarqube-5e767fe7053bcdd4b7d63fd6af80305c790fb5ae.tar.gz
sonarqube-5e767fe7053bcdd4b7d63fd6af80305c790fb5ae.zip
Automatic merge from branch-4.5
* origin/branch-4.5: Try to improve stability of CommandExecutorTest
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/utils/command/CommandExecutorTest.java8
1 files changed, 4 insertions, 4 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 0dcba90e1ed..7a1f4386312 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
@@ -53,7 +53,7 @@ public class CommandExecutorTest {
workDir = tempFolder.newFolder(testName.getMethodName());
}
- @Test
+ @Test(timeout = 3000L)
public void should_consume_StdOut_and_StdErr() throws Exception {
// too many false-positives on MS windows
if (!SystemUtils.IS_OS_WINDOWS) {
@@ -82,7 +82,7 @@ public class CommandExecutorTest {
}
}
- @Test
+ @Test(timeout = 3000L)
public void stdOut_consumer_can_throw_exception() throws Exception {
Command command = Command.create(getScript("output")).setDirectory(workDir);
thrown.expect(CommandException.class);
@@ -90,12 +90,12 @@ public class CommandExecutorTest {
CommandExecutor.create().execute(command, BAD_CONSUMER, NOP_CONSUMER, 1000L);
}
- @Test
+ @Test(timeout = 3000L)
public void stdErr_consumer_can_throw_exception() throws Exception {
Command command = Command.create(getScript("output")).setDirectory(workDir);
thrown.expect(CommandException.class);
thrown.expectMessage("Error inside stdErr stream");
- CommandExecutor.create().execute(command, NOP_CONSUMER, BAD_CONSUMER, 1000L);
+ CommandExecutor.create().execute(command, NOP_CONSUMER, BAD_CONSUMER, 1500L);
}
private static final StreamConsumer NOP_CONSUMER = new StreamConsumer() {