From c3cfbfff665553d421828d1ce77ece6e01a5deb8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Thu, 17 Mar 2016 11:19:38 +0100 Subject: [PATCH] SONAR-6732 only Web Server should deal with server id --- .../sonar/ce/container/ComputeEngineContainerImpl.java | 8 +++----- .../ce/container/ComputeEngineContainerImplTest.java | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java index 3b05c1e7047..7292e6bd836 100644 --- a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java +++ b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java @@ -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 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 10bac84f6b8..8cd8deeff38 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 @@ -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 -- 2.39.5