aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-process-monitor
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-06-13 15:03:07 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-06-13 15:03:07 +0200
commitfa8036ca566df868aca72ab32de5cd6af79b20ab (patch)
tree73c22f3b1d44f24da40c5893fb4ac57ac3cc8d2e /server/sonar-process-monitor
parent409c8248f752b2f9078e7435c852e3f75e8d5938 (diff)
downloadsonarqube-fa8036ca566df868aca72ab32de5cd6af79b20ab.tar.gz
sonarqube-fa8036ca566df868aca72ab32de5cd6af79b20ab.zip
Fix stability of SchedulerImplTest
Diffstat (limited to 'server/sonar-process-monitor')
-rw-r--r--server/sonar-process-monitor/src/test/java/org/sonar/application/SchedulerImplTest.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/sonar-process-monitor/src/test/java/org/sonar/application/SchedulerImplTest.java b/server/sonar-process-monitor/src/test/java/org/sonar/application/SchedulerImplTest.java
index 33c4cc2f0b9..eae0850b815 100644
--- a/server/sonar-process-monitor/src/test/java/org/sonar/application/SchedulerImplTest.java
+++ b/server/sonar-process-monitor/src/test/java/org/sonar/application/SchedulerImplTest.java
@@ -41,6 +41,7 @@ import org.sonar.application.process.ProcessMonitor;
import org.sonar.process.ProcessId;
import org.sonar.process.ProcessProperties;
+import static java.util.Collections.synchronizedList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
@@ -67,7 +68,7 @@ public class SchedulerImplTest {
private TestJavaCommandFactory javaCommandFactory = new TestJavaCommandFactory();
private TestJavaProcessLauncher processLauncher = new TestJavaProcessLauncher();
private TestAppState appState = new TestAppState();
- private List<ProcessId> orderedStops = new ArrayList<>();
+ private List<ProcessId> orderedStops = synchronizedList(new ArrayList<>());
@After
public void tearDown() throws Exception {
@@ -321,7 +322,7 @@ public class SchedulerImplTest {
private class TestJavaProcessLauncher implements JavaProcessLauncher {
private final EnumMap<ProcessId, TestProcess> processes = new EnumMap<>(ProcessId.class);
- private final List<JavaCommand> commands = new ArrayList<>();
+ private final List<JavaCommand> commands = synchronizedList(new ArrayList<>());
private ProcessId makeStartupFail = null;
@Override