File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed
buildSrc/src/main/groovy/org/elasticsearch/gradle Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -509,11 +509,9 @@ class BuildPlugin implements Plugin<Project> {
509509 }
510510 }
511511
512- // System assertions (-esa) are disabled for now because of what looks like a
513- // JDK bug triggered by Groovy on JDK7. We should look at re-enabling system
514- // assertions when we upgrade to a new version of Groovy (currently 2.4.4) or
515- // require JDK8. See https://issues.apache.org/jira/browse/GROOVY-7528.
516- enableSystemAssertions false
512+ boolean assertionsEnabled = Boolean . parseBoolean(System . getProperty(' tests.asserts' , ' true' ))
513+ enableSystemAssertions assertionsEnabled
514+ enableAssertions assertionsEnabled
517515
518516 testLogging {
519517 showNumFailuresAtEnd 25
Original file line number Diff line number Diff line change @@ -72,12 +72,10 @@ class ClusterConfiguration {
7272 boolean useMinimumMasterNodes = true
7373
7474 @Input
75- String jvmArgs = " -ea" +
76- " " + " -Xms" + System . getProperty(' tests.heap.size' , ' 512m' ) +
75+ String jvmArgs = " -Xms" + System . getProperty(' tests.heap.size' , ' 512m' ) +
7776 " " + " -Xmx" + System . getProperty(' tests.heap.size' , ' 512m' ) +
7877 " " + System . getProperty(' tests.jvm.argline' , ' ' )
7978
80-
8179 /**
8280 * A closure to call which returns the unicast host to connect to for cluster formation.
8381 *
Original file line number Diff line number Diff line change @@ -151,6 +151,9 @@ class NodeInfo {
151151 args. addAll(" -E" , " node.portsfile=true" )
152152 String collectedSystemProperties = config. systemProperties. collect { key , value -> " -D${ key} =${ value} " }. join(" " )
153153 String esJavaOpts = config. jvmArgs. isEmpty() ? collectedSystemProperties : collectedSystemProperties + " " + config. jvmArgs
154+ if (Boolean . parseBoolean(System . getProperty(' tests.asserts' , ' true' ))) {
155+ esJavaOpts + = " -ea -esa"
156+ }
154157 env. put(' ES_JAVA_OPTS' , esJavaOpts)
155158 for (Map.Entry < String , String > property : System . properties. entrySet()) {
156159 if (property. key. startsWith(' tests.es.' )) {
You can’t perform that action at this time.
0 commit comments