aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-10-09 07:35:11 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-10-09 07:35:11 +0200
commit1f9c79116054ce696871143403f2491ce410e39b (patch)
tree202f80b717bd86fc7ea0e8900df7d9b7350252aa /sonar-application
parent3794337ce0d72a52a8d73299cc74a46962a2c2b7 (diff)
downloadsonarqube-1f9c79116054ce696871143403f2491ce410e39b.tar.gz
sonarqube-1f9c79116054ce696871143403f2491ce410e39b.zip
SONAR-5687 refactor configuration of cluster
Diffstat (limited to 'sonar-application')
-rw-r--r--sonar-application/src/main/java/org/sonar/application/App.java4
-rw-r--r--sonar-application/src/test/java/org/sonar/application/AppTest.java4
2 files changed, 4 insertions, 4 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 f0a859435ef..b70b2666de1 100644
--- a/sonar-application/src/main/java/org/sonar/application/App.java
+++ b/sonar-application/src/main/java/org/sonar/application/App.java
@@ -81,8 +81,8 @@ public class App implements Stoppable {
.addClasspath("./lib/search/*");
commands.add(elasticsearch);
- // do not yet start SQ in cluster mode. See SONAR-5483 & SONAR-5391
- if (StringUtils.isEmpty(props.value(ProcessConstants.CLUSTER_MASTER_HOSTS))) {
+ // do not yet start SQ on elasticsearch slaves
+ if (StringUtils.isBlank(props.value(ProcessConstants.CLUSTER_MASTER_HOST))) {
JavaCommand webServer = new JavaCommand("web")
.setWorkDir(homeDir)
.addJavaOptions("-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false")
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 c419e846ac1..9d5c0e48826 100644
--- a/sonar-application/src/test/java/org/sonar/application/AppTest.java
+++ b/sonar-application/src/test/java/org/sonar/application/AppTest.java
@@ -91,11 +91,11 @@ public class AppTest {
}
@Test
- public void do_not_start_tomcat_if_elasticsearch_single_node() throws Exception {
+ public void do_not_start_tomcat_if_elasticsearch_slave() throws Exception {
Monitor monitor = mock(Monitor.class);
App app = new App(monitor);
Props props = initDefaultProps();
- props.set("sonar.cluster.master", "x.y.z");
+ props.set("sonar.cluster.masterHost", "1.2.3.4");
app.start(props);
Class<List<JavaCommand>> listClass = (Class<List<JavaCommand>>)(Class)List.class;