aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/test/java/org/sonar/api/utils/command
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2014-04-25 00:01:03 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2014-04-25 00:02:10 +0200
commit9889c094f169beff6c9b9104f594b8f9ac20f0c8 (patch)
treecb1f1055623d5514bc3be5884a3c1443cba2b738 /sonar-plugin-api/src/test/java/org/sonar/api/utils/command
parent478383011bba15b19869380384aa569697706681 (diff)
downloadsonarqube-9889c094f169beff6c9b9104f594b8f9ac20f0c8.tar.gz
sonarqube-9889c094f169beff6c9b9104f594b8f9ac20f0c8.zip
SONAR-5234 new org.sonar.api.utils.command.TimeoutException
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.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 b3891832993..3eaca6e0072 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
@@ -110,9 +110,9 @@ public class CommandExecutorTest {
@Test
public void should_use_working_directory_to_store_argument_and_environment_variable() throws Exception {
Command command = Command.create(getScript("echo"))
- .setDirectory(workDir)
- .addArgument("1")
- .setEnvironmentVariable("ENVVAR", "2");
+ .setDirectory(workDir)
+ .addArgument("1")
+ .setEnvironmentVariable("ENVVAR", "2");
int exitCode = CommandExecutor.create().execute(command, 1000L);
assertThat(exitCode).isEqualTo(0);
File logFile = new File(workDir, "echo.log");
@@ -130,7 +130,7 @@ public class CommandExecutorTest {
try {
CommandExecutor.create().execute(Command.create(executable).setDirectory(workDir), 300L);
fail();
- } catch (CommandException e) {
+ } catch (TimeoutException e) {
long duration = System.currentTimeMillis() - start;
// should test >= 300 but it strangly fails during build on windows.
// The timeout is raised after 297ms (??)