]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-11804 do not send -server flag to ES JVM anymore
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Tue, 12 Mar 2019 10:25:16 +0000 (11:25 +0100)
committerSonarTech <sonartech@sonarsource.com>
Mon, 18 Mar 2019 19:20:59 +0000 (20:20 +0100)
server/sonar-main/src/main/java/org/sonar/application/command/EsJvmOptions.java
server/sonar-main/src/test/java/org/sonar/application/command/CommandFactoryImplTest.java
server/sonar-main/src/test/java/org/sonar/application/command/EsJvmOptionsTest.java

index 7a30a8d938d02b33860e54b8e00f76bc7fdc024d..f71240d4fba22f5d99f540cf1890fc7e41761603 100644 (file)
@@ -44,7 +44,6 @@ public class EsJvmOptions extends JvmOptions<EsJvmOptions> {
     res.put("-XX:CMSInitiatingOccupancyFraction=", "75");
     res.put("-XX:+UseCMSInitiatingOccupancyOnly", "");
     res.put("-XX:+AlwaysPreTouch", "");
-    res.put("-server", "");
     res.put("-Xss", "1m");
     res.put("-Djava.awt.headless=", "true");
     res.put("-Dfile.encoding=", "UTF-8");
index d2e9328f8d0a91db67ee63e5a494120ef0983ce6..eae7e231be64f0262b2e82597d706600bd2f7bbe 100644 (file)
@@ -136,7 +136,7 @@ public class CommandFactoryImplTest {
     assertThat(esConfig.getPort()).isEqualTo(9001);
     assertThat(esConfig.getEsJvmOptions().getAll())
       // enforced values
-      .contains("-XX:+UseConcMarkSweepGC", "-server", "-Dfile.encoding=UTF-8")
+      .contains("-XX:+UseConcMarkSweepGC", "-Dfile.encoding=UTF-8")
       // default settings
       .contains("-Xms512m", "-Xmx512m", "-XX:+HeapDumpOnOutOfMemoryError");
     File esConfDir = new File(tempDir, "conf/es");
@@ -169,7 +169,7 @@ public class CommandFactoryImplTest {
     assertThat(esConfig.getPort()).isEqualTo(9001);
     assertThat(esConfig.getEsJvmOptions().getAll())
       // enforced values
-      .contains("-XX:+UseConcMarkSweepGC", "-server", "-Dfile.encoding=UTF-8")
+      .contains("-XX:+UseConcMarkSweepGC", "-Dfile.encoding=UTF-8")
       // default settings
       .contains("-Xms512m", "-Xmx512m", "-XX:+HeapDumpOnOutOfMemoryError");
     File esConfDir = new File(tempDir, "conf/es");
@@ -201,7 +201,7 @@ public class CommandFactoryImplTest {
     assertThat(esConfig.getPort()).isEqualTo(1234);
     assertThat(esConfig.getEsJvmOptions().getAll())
       // enforced values
-      .contains("-XX:+UseConcMarkSweepGC", "-server", "-Dfile.encoding=UTF-8")
+      .contains("-XX:+UseConcMarkSweepGC", "-Dfile.encoding=UTF-8")
       // user settings
       .contains("-Xms10G", "-Xmx10G")
       // default values disabled
index 67fae79138292d0bae914d585acf63a09e4dee60..3d057470e804e59e98c60c08bd2a500b491d43e4 100644 (file)
@@ -44,7 +44,6 @@ public class EsJvmOptionsTest {
       "-XX:CMSInitiatingOccupancyFraction=75",
       "-XX:+UseCMSInitiatingOccupancyOnly",
       "-XX:+AlwaysPreTouch",
-      "-server",
       "-Xss1m",
       "-Djava.awt.headless=true",
       "-Dfile.encoding=UTF-8",
@@ -77,7 +76,6 @@ public class EsJvmOptionsTest {
         "-XX:CMSInitiatingOccupancyFraction=75\n" +
         "-XX:+UseCMSInitiatingOccupancyOnly\n" +
         "-XX:+AlwaysPreTouch\n" +
-        "-server\n" +
         "-Xss1m\n" +
         "-Djava.awt.headless=true\n" +
         "-Dfile.encoding=UTF-8\n" +