Browse Source

MINOR: Set JVM parameters for the Gradle Test executor processes

We suspect that the test suite hangs we have been seeing are
due to PermGen exhaustion. It is a common reason for
hard JVM lock-ups.

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Jason Gustafson <jason@confluent.io>

Closes #1926 from ijuma/test-jvm-params
pull/1931/head
Ismael Juma 8 years ago committed by Jason Gustafson
parent
commit
67e99d0869
  1. 12
      build.gradle

12
build.gradle

@ -71,6 +71,10 @@ ext { @@ -71,6 +71,10 @@ ext {
gradleVersion = "3.0"
buildVersionFileName = "kafka-version.properties"
maxPermSizeArgs = []
if (!JavaVersion.current().isJava8Compatible())
maxPermSizeArgs = ['-XX:MaxPermSize=512m']
userMaxForks = project.hasProperty('maxParallelForks') ? maxParallelForks.toInteger() : null
skipSigning = project.hasProperty('skipSigning') && skipSigning.toBoolean()
@ -157,11 +161,17 @@ subprojects { @@ -157,11 +161,17 @@ subprojects {
test {
maxParallelForks = userMaxForks ?: Runtime.runtime.availableProcessors()
minHeapSize = "256m"
maxHeapSize = "2048m"
jvmArgs = maxPermSizeArgs
testLogging {
events = userTestLoggingEvents ?: ["passed", "skipped", "failed"]
showStandardStreams = userShowStandardStreams ?: false
exceptionFormat = 'full'
}
}
jar {
@ -250,7 +260,7 @@ subprojects { @@ -250,7 +260,7 @@ subprojects {
configure(scalaCompileOptions.forkOptions) {
memoryMaximumSize = '1g'
jvmArgs = ['-XX:MaxPermSize=512m', '-Xss2m']
jvmArgs = ['-Xss2m'] + maxPermSizeArgs
}
}

Loading…
Cancel
Save