Passthrough test logger level to nodes

This commit passes the system property tests.logger.level down to the
external nodes launched in integration tests. Specific tests that want
to override the default logging level should push down a setting to
the nodes using cluster configuration instead of pushing down a system
property to the nodes using cluster configuration.

Relates #18489
This commit is contained in:
Jason Tedor 2016-05-20 10:40:55 -04:00
parent 8b962bb234
commit 76f310ea15
1 changed files with 4 additions and 0 deletions

View File

@ -130,6 +130,10 @@ class NodeInfo {
env = [ 'JAVA_HOME' : project.javaHome ]
args.addAll("-E", "node.portsfile=true")
String loggerLevel = System.getProperty("tests.logger.level")
if (loggerLevel != null) {
args.addAll("-E", "logger.level=${loggerLevel}")
}
String collectedSystemProperties = config.systemProperties.collect { key, value -> "-D${key}=${value}" }.join(" ")
String esJavaOpts = config.jvmArgs.isEmpty() ? collectedSystemProperties : collectedSystemProperties + " " + config.jvmArgs
env.put('ES_JAVA_OPTS', esJavaOpts)