Merge pull request #22443 from rjernst/disable_assertions
Use tests.asserts flag to allow disabling assertions
This commit is contained in:
commit
5adb3f992c
|
@ -515,11 +515,9 @@ class BuildPlugin implements Plugin<Project> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// System assertions (-esa) are disabled for now because of what looks like a
|
boolean assertionsEnabled = Boolean.parseBoolean(System.getProperty('tests.asserts', 'true'))
|
||||||
// JDK bug triggered by Groovy on JDK7. We should look at re-enabling system
|
enableSystemAssertions assertionsEnabled
|
||||||
// assertions when we upgrade to a new version of Groovy (currently 2.4.4) or
|
enableAssertions assertionsEnabled
|
||||||
// require JDK8. See https://issues.apache.org/jira/browse/GROOVY-7528.
|
|
||||||
enableSystemAssertions false
|
|
||||||
|
|
||||||
testLogging {
|
testLogging {
|
||||||
showNumFailuresAtEnd 25
|
showNumFailuresAtEnd 25
|
||||||
|
|
|
@ -72,12 +72,10 @@ class ClusterConfiguration {
|
||||||
boolean useMinimumMasterNodes = true
|
boolean useMinimumMasterNodes = true
|
||||||
|
|
||||||
@Input
|
@Input
|
||||||
String jvmArgs = "-ea" +
|
String jvmArgs = "-Xms" + System.getProperty('tests.heap.size', '512m') +
|
||||||
" " + "-Xms" + System.getProperty('tests.heap.size', '512m') +
|
|
||||||
" " + "-Xmx" + System.getProperty('tests.heap.size', '512m') +
|
" " + "-Xmx" + System.getProperty('tests.heap.size', '512m') +
|
||||||
" " + System.getProperty('tests.jvm.argline', '')
|
" " + System.getProperty('tests.jvm.argline', '')
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A closure to call which returns the unicast host to connect to for cluster formation.
|
* A closure to call which returns the unicast host to connect to for cluster formation.
|
||||||
*
|
*
|
||||||
|
|
|
@ -151,6 +151,9 @@ class NodeInfo {
|
||||||
args.addAll("-E", "node.portsfile=true")
|
args.addAll("-E", "node.portsfile=true")
|
||||||
String collectedSystemProperties = config.systemProperties.collect { key, value -> "-D${key}=${value}" }.join(" ")
|
String collectedSystemProperties = config.systemProperties.collect { key, value -> "-D${key}=${value}" }.join(" ")
|
||||||
String esJavaOpts = config.jvmArgs.isEmpty() ? collectedSystemProperties : collectedSystemProperties + " " + config.jvmArgs
|
String esJavaOpts = config.jvmArgs.isEmpty() ? collectedSystemProperties : collectedSystemProperties + " " + config.jvmArgs
|
||||||
|
if (Boolean.parseBoolean(System.getProperty('tests.asserts', 'true'))) {
|
||||||
|
esJavaOpts += " -ea -esa"
|
||||||
|
}
|
||||||
env.put('ES_JAVA_OPTS', esJavaOpts)
|
env.put('ES_JAVA_OPTS', esJavaOpts)
|
||||||
for (Map.Entry<String, String> property : System.properties.entrySet()) {
|
for (Map.Entry<String, String> property : System.properties.entrySet()) {
|
||||||
if (property.key.startsWith('tests.es.')) {
|
if (property.key.startsWith('tests.es.')) {
|
||||||
|
|
Loading…
Reference in New Issue