diff options
author | Daniel Schwarz <daniel.schwarz@sonarsource.com> | 2017-07-28 10:52:45 +0200 |
---|---|---|
committer | Daniel Schwarz <bartfastiel@users.noreply.github.com> | 2017-08-09 15:09:54 +0200 |
commit | 4a0af974b74e68159b9304752b5832487bf58cf8 (patch) | |
tree | f157971bf3722e28c635993ed9622f4d041e8c99 /server/sonar-server | |
parent | d51a060fe56d7a9c9ed9f1d3544228a445a92e25 (diff) | |
download | sonarqube-4a0af974b74e68159b9304752b5832487bf58cf8.tar.gz sonarqube-4a0af974b74e68159b9304752b5832487bf58cf8.zip |
SONAR-8798 reduce Elasticsearch log level to "WARN" for unit tests
Diffstat (limited to 'server/sonar-server')
-rw-r--r-- | server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java b/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java index addb74de18a..5a0bf45b3f0 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java @@ -44,6 +44,7 @@ import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.client.Client; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.metadata.MetaData; +import org.elasticsearch.common.Strings; import org.elasticsearch.common.network.NetworkModule; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; @@ -81,6 +82,10 @@ public class EsTester extends ExternalResource { System.setProperty("es.log4j.shutdownEnabled", "false"); System.setProperty("log4j2.disable.jmx", "true"); System.setProperty("log4j.skipJansi", "true"); // jython has this crazy shaded Jansi version that log4j2 tries to load + + if (!Strings.hasLength(System.getProperty("tests.es.logger.level"))) { + System.setProperty("tests.es.logger.level", "WARN"); + } } private static final Set<String> NO_TEMPLATES_SURVIVING_WIPE = Collections.emptySet(); |