aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ce
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-10-16 12:01:26 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-10-16 13:57:02 +0200
commit67092c55703df05c435d340ce1031bfd6c5777f2 (patch)
treec6fdaf212e3f2590c7b0279d035798e4fb87d6cb /server/sonar-ce
parent2bde31ecbf8fc27d5cffcf811cbe58298ec7124e (diff)
downloadsonarqube-67092c55703df05c435d340ce1031bfd6c5777f2.tar.gz
sonarqube-67092c55703df05c435d340ce1031bfd6c5777f2.zip
Fix warning at startup regarding JVmStateSection
Two same instances of JvmStateSection are defined in pico. It generates the warning log: "WARN  ce[][o.s.c.p.ComponentKeys] Bad component key: org.sonar.process.systeminfo.JvmStateSection@13078cb2. Please implement toString() method on class org.sonar.process.systeminfo.JvmStateSection"
Diffstat (limited to 'server/sonar-ce')
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/CeConfigurationModule.java8
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java6
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java4
3 files changed, 8 insertions, 10 deletions
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/CeConfigurationModule.java b/server/sonar-ce/src/main/java/org/sonar/ce/CeConfigurationModule.java
index e239b685e16..1f45caebe84 100644
--- a/server/sonar-ce/src/main/java/org/sonar/ce/CeConfigurationModule.java
+++ b/server/sonar-ce/src/main/java/org/sonar/ce/CeConfigurationModule.java
@@ -21,9 +21,11 @@ package org.sonar.ce;
import org.sonar.ce.configuration.CeConfigurationImpl;
import org.sonar.ce.log.CeLogging;
+import org.sonar.ce.monitoring.CeDatabaseMBeanImpl;
import org.sonar.core.platform.Module;
+import org.sonar.process.systeminfo.JvmPropertiesSection;
import org.sonar.process.systeminfo.JvmStateSection;
-import org.sonar.ce.monitoring.CeDatabaseMBeanImpl;
+import org.sonar.server.platform.monitoring.cluster.LoggingSection;
public class CeConfigurationModule extends Module {
@Override
@@ -32,6 +34,8 @@ public class CeConfigurationModule extends Module {
CeConfigurationImpl.class,
CeLogging.class,
CeDatabaseMBeanImpl.class,
- new JvmStateSection("Compute Engine JVM State"));
+ new JvmStateSection("Compute Engine JVM State"),
+ new JvmPropertiesSection("Compute Engine JVM Properties"),
+ LoggingSection.class);
}
}
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java b/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java
index f1776dd8c78..a34c2d77411 100644
--- a/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java
+++ b/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java
@@ -24,9 +24,6 @@ import org.sonar.ce.monitoring.CeTasksMBeanImpl;
import org.sonar.ce.queue.CeQueueInitializer;
import org.sonar.ce.queue.InternalCeQueueImpl;
import org.sonar.core.platform.Module;
-import org.sonar.process.systeminfo.JvmPropertiesSection;
-import org.sonar.process.systeminfo.JvmStateSection;
-import org.sonar.server.platform.monitoring.cluster.LoggingSection;
public class CeQueueModule extends Module {
@Override
@@ -38,9 +35,6 @@ public class CeQueueModule extends Module {
// queue monitoring
CEQueueStatusImpl.class,
CeTasksMBeanImpl.class,
- new JvmStateSection("Compute Engine JVM State"),
- new JvmPropertiesSection("Compute Engine JVM Properties"),
- LoggingSection.class,
// init queue state and queue processing
CeQueueInitializer.class);
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
index 3a6b1a74cf2..b080ec9da78 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
@@ -130,8 +130,8 @@ public class ComputeEngineContainerImplTest {
.hasSize(
CONTAINER_ITSELF
+ 75 // level 4
- + 4 // content of CeConfigurationModule
- + 7 // content of CeQueueModule
+ + 6 // content of CeConfigurationModule
+ + 4 // content of CeQueueModule
+ 4 // content of CeHttpModule
+ 3 // content of CeTaskCommonsModule
+ 4 // content of ProjectAnalysisTaskModule