aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application/src/test
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-01-08 18:01:57 +0100
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-01-13 13:42:43 +0100
commit5db076096966170cde636fa2c41d7777abca193e (patch)
tree650eb1d38a41d78f76f363ef3a748b785107d3ec /sonar-application/src/test
parent255e54d582d02ab72d1b33f440656fb2d5ae9f8c (diff)
downloadsonarqube-5db076096966170cde636fa2c41d7777abca193e.tar.gz
sonarqube-5db076096966170cde636fa2c41d7777abca193e.zip
SONAR-7168 fix stop during restart not working
lifeCycle transition from RESTARTING to STOPPING should actually _not_ be allowed because it can occur when restarting child processes (the WatcherThreads detects that stop and tries to shutdown all other processes), this fixes the issue by adding a HARD_STOPPING state, representing a not gracefull stop, to which transition from RESTARTING is allowed adds class AllProcessesCommands which implements access to sharedMemory for any process and is now used as the underlying implementation of DefaultProcessCommands. This class allows using a single IO to access sharedMemory from App
Diffstat (limited to 'sonar-application/src/test')
-rw-r--r--sonar-application/src/test/java/org/sonar/application/AppTest.java24
1 files changed, 0 insertions, 24 deletions
diff --git a/sonar-application/src/test/java/org/sonar/application/AppTest.java b/sonar-application/src/test/java/org/sonar/application/AppTest.java
index 8b468bb2b52..03b33e8111b 100644
--- a/sonar-application/src/test/java/org/sonar/application/AppTest.java
+++ b/sonar-application/src/test/java/org/sonar/application/AppTest.java
@@ -53,30 +53,6 @@ public class AppTest {
}
@Test
- public void do_not_watch_stop_file_by_default() throws Exception {
- Monitor monitor = mock(Monitor.class);
- App app = new App(monitor);
- app.start(initDefaultProps());
-
- assertThat(app.getStopWatcher()).isNull();
- }
-
- @Test
- public void watch_stop_file() throws Exception {
- Monitor monitor = mock(Monitor.class);
- App app = new App(monitor);
- Props props = initDefaultProps();
- props.set("sonar.enableStopCommand", "true");
- app.start(props);
-
- assertThat(app.getStopWatcher()).isNotNull();
- assertThat(app.getStopWatcher().isAlive()).isTrue();
-
- app.getStopWatcher().stopWatching();
- app.getStopWatcher().interrupt();
- }
-
- @Test
public void start_elasticsearch_and_tomcat_by_default() throws Exception {
Monitor monitor = mock(Monitor.class);
App app = new App(monitor);