]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6732 only Web Server should deal with server id
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Thu, 17 Mar 2016 10:19:38 +0000 (11:19 +0100)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Mon, 21 Mar 2016 15:44:05 +0000 (16:44 +0100)
server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java

index 3b05c1e70475c20c30f25b80e0062e6aafa2f408..7292e6bd8365988a829490f192b0e8f3e4e38267 100644 (file)
@@ -102,7 +102,6 @@ import org.sonar.server.platform.DatabaseServerCompatibility;
 import org.sonar.server.platform.DefaultServerFileSystem;
 import org.sonar.server.platform.DefaultServerUpgradeStatus;
 import org.sonar.server.platform.PersistentSettings;
-import org.sonar.server.platform.ServerIdGenerator;
 import org.sonar.server.platform.ServerImpl;
 import org.sonar.server.platform.ServerLifecycleNotifier;
 import org.sonar.server.platform.ServerLogging;
@@ -128,7 +127,6 @@ import org.sonar.server.rule.index.RuleIndex;
 import org.sonar.server.rule.index.RuleIndexer;
 import org.sonar.server.search.EsSearchModule;
 import org.sonar.server.startup.LogServerId;
-import org.sonar.server.startup.ServerMetadataPersister;
 import org.sonar.server.test.index.TestIndexer;
 import org.sonar.server.user.index.UserIndex;
 import org.sonar.server.user.index.UserIndexer;
@@ -195,10 +193,10 @@ public class ComputeEngineContainerImpl implements ComputeEngineContainer {
   };
   private static final Object[] LEVEL_3_COMPONENTS = new Object[] {
     PersistentSettings.class,
-    ServerMetadataPersister.class,
-//    DefaultHttpDownloader.class, does not make sense to use it from Compute Engine
+    // ServerMetadataPersister.class, server id is the responsibility of Web Server
+    // DefaultHttpDownloader.class, does not make sense to use it from Compute Engine
     UriReader.class,
-    ServerIdGenerator.class
+    // ServerIdGenerator.class, server id is the responsibility of Web Server
   };
   private static final Object[] LEVEL_4_COMPONENTS = new Object[] {
     // PluginDownloader.class, no use in CE
index 10bac84f6b8f69b3088f5db36c65a92416349a89..8cd8deeff3873394a113035845b89fa5e68b3fba 100644 (file)
@@ -80,7 +80,7 @@ public class ComputeEngineContainerImplTest {
       );
     assertThat(picoContainer.getParent().getComponentAdapters()).hasSize(
       CONTAINER_ITSELF
-      + 4 // level 3
+      + 2 // level 3
       );
     assertThat(picoContainer.getParent().getParent().getComponentAdapters()).hasSize(
       CONTAINER_ITSELF