I\'ve been trying to compile and test a large project to use Gradle. The test run fine until they die unexpectedly. I dug around and resources said that this is due to a mem
I had a similar issue with Bamboo agents (running on Docker) running Gradle 4.6. The test task just abruptly terminated with
build 27-Dec-2018 22:00:20 22:00:20.018 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'Gradle Test Executor 1' finished with exit value 137 (state: FAILED)
We have over 3000 unit tests. In our case, the issue was solved using forkEvery to limit the number of test classes run per test executor process, and also limiting memory usage:
test {
maxHeapSize '512m'
forkEvery 100
jvmArgs '-Xmx512m', '-Xms512m'
}