diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2013-11-28 19:03:02 +0100 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2013-12-02 15:54:24 +0100 |
commit | 0e5517fe801cce6e26db2c0b2f269cd9d9649b74 (patch) | |
tree | 79b0fa0a2b5f060ebfcef48e4efcdfc9ebcf330d /sonar-server/src/test | |
parent | 01cfe82cb05f6d2f5936eb126fd63a8eaab81721 (diff) | |
download | sonarqube-0e5517fe801cce6e26db2c0b2f269cd9d9649b74.tar.gz sonarqube-0e5517fe801cce6e26db2c0b2f269cd9d9649b74.zip |
SONAR-4901 Implement FULL level profiling at ES index level
Diffstat (limited to 'sonar-server/src/test')
-rw-r--r-- | sonar-server/src/test/java/org/sonar/server/rule/RuleRegistryTest.java | 8 | ||||
-rw-r--r-- | sonar-server/src/test/java/org/sonar/server/search/SearchIndexTest.java | 7 |
2 files changed, 13 insertions, 2 deletions
diff --git a/sonar-server/src/test/java/org/sonar/server/rule/RuleRegistryTest.java b/sonar-server/src/test/java/org/sonar/server/rule/RuleRegistryTest.java index fb55c4a99fc..ec3d11b9553 100644 --- a/sonar-server/src/test/java/org/sonar/server/rule/RuleRegistryTest.java +++ b/sonar-server/src/test/java/org/sonar/server/rule/RuleRegistryTest.java @@ -20,6 +20,9 @@ package org.sonar.server.rule; +import org.sonar.api.config.Settings; + +import org.sonar.core.profiling.Profiling; import com.github.tlrx.elasticsearch.test.EsSetup; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -60,7 +63,10 @@ public class RuleRegistryTest { SearchNode node = mock(SearchNode.class); when(node.client()).thenReturn(esSetup.client()); - searchIndex = new SearchIndex(node); + Settings settings = new Settings(); + settings.setProperty("sonar.log.profilingLevel", "FULL"); + Profiling profiling = new Profiling(settings); + searchIndex = new SearchIndex(node, profiling); searchIndex.start(); registry = new RuleRegistry(searchIndex, ruleDao, ruleI18nManager); diff --git a/sonar-server/src/test/java/org/sonar/server/search/SearchIndexTest.java b/sonar-server/src/test/java/org/sonar/server/search/SearchIndexTest.java index aee360967c7..3a505730825 100644 --- a/sonar-server/src/test/java/org/sonar/server/search/SearchIndexTest.java +++ b/sonar-server/src/test/java/org/sonar/server/search/SearchIndexTest.java @@ -20,6 +20,9 @@ package org.sonar.server.search; +import org.sonar.api.config.Settings; + +import org.sonar.core.profiling.Profiling; import com.github.tlrx.elasticsearch.test.EsSetup; import org.elasticsearch.common.io.BytesStream; import org.elasticsearch.common.xcontent.XContentFactory; @@ -50,7 +53,9 @@ public class SearchIndexTest { searchNode = mock(SearchNode.class); when(searchNode.client()).thenReturn(esSetup.client()); - searchIndex = new SearchIndex(searchNode); + Settings settings = new Settings(); + settings.setProperty("sonar.log.profilingLevel", "BASIC"); + searchIndex = new SearchIndex(searchNode, new Profiling(settings)); searchIndex.start(); } |