aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-05-29 11:25:01 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-05-29 11:25:01 +0200
commit0cc7aa3e7a4f3e8a3838bbbfb970aeb4775c4e9d (patch)
tree16331cc2009b399fb7632fcb3d2661b8ebe10989 /sonar-application
parentb0f14fa5862298c7296eb9cd61f6ca3de71b3d34 (diff)
downloadsonarqube-0cc7aa3e7a4f3e8a3838bbbfb970aeb4775c4e9d.tar.gz
sonarqube-0cc7aa3e7a4f3e8a3838bbbfb970aeb4775c4e9d.zip
Extract an interface from org.sonar.process.ProcessCommands
Try to stabilize StopWatcherTest when machine is slow or under pressure. More than 1 second could be spent in the creation of ProcessCommands mock.
Diffstat (limited to 'sonar-application')
-rw-r--r--sonar-application/src/main/java/org/sonar/application/App.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/App.java b/sonar-application/src/main/java/org/sonar/application/App.java
index 26130401dac..9547d505895 100644
--- a/sonar-application/src/main/java/org/sonar/application/App.java
+++ b/sonar-application/src/main/java/org/sonar/application/App.java
@@ -21,6 +21,7 @@ package org.sonar.application;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang.StringUtils;
+import org.sonar.process.DefaultProcessCommands;
import org.sonar.process.MinimumViableSystem;
import org.sonar.process.ProcessCommands;
import org.sonar.process.ProcessProperties;
@@ -54,7 +55,7 @@ public class App implements Stoppable {
public void start(Props props) {
if (props.valueAsBoolean(ProcessProperties.ENABLE_STOP_COMMAND, false)) {
File tempDir = props.nonNullValueAsFile(ProcessProperties.PATH_TEMP);
- ProcessCommands commands = new ProcessCommands(tempDir, 0);
+ ProcessCommands commands = new DefaultProcessCommands(tempDir, 0);
stopWatcher = new StopWatcher(commands, this);
stopWatcher.start();
}