aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java5
-rwxr-xr-xtravis.sh2
2 files changed, 6 insertions, 1 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();
diff --git a/travis.sh b/travis.sh
index 0cc60cad32c..70f6b1e2cec 100755
--- a/travis.sh
+++ b/travis.sh
@@ -119,7 +119,7 @@ BUILD)
# Minimal Maven settings
export MAVEN_OPTS="-Xmx1G -Xms128m"
- MAVEN_ARGS="-T 1C -Dmaven.test.redirectTestOutputToFile=false -Dsurefire.useFile=false -B -e -V -DbuildVersion=$BUILD_VERSION"
+ MAVEN_ARGS="-T 1C -Dmaven.test.redirectTestOutputToFile=false -Dsurefire.useFile=false -B -e -V -DbuildVersion=$BUILD_VERSION -Dtests.es.logger.level=WARN"
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo 'Build and analyze master'