We are using Gradle to build and run tests in Jenkins for CI. In many builds we see build failures with the following text:
Execution failed for task ':myTests'.\n > Process 'Gradle Test Executor 79' finished with non-zero exit value 143\n This problem might be caused by incorrect test process configuration.\n Please refer to the test execution section in the user guide at https://docs.gradle.org/4.6/userguide/java_plugin.html#sec:test_execution\n \n * Try:\n Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.\n \n * Get more help at https://help.gradle.org\n \n Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.\n See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings\n \n BUILD FAILED in 15m 35s\n 4 actionable tasks: 4 executed\n }\n Xvfb stopping\n // wrap\n }\n // dir\n echo\n hudson.AbortException: script returned exit code 1
We are using Gradle 4.6 and this usually happens when we are executing tests with a command similar to
./gradlew myTests --no-daemon -Dgeb.env=mygebenv
A couple other notes:
This does not happen in every build, but it happens very often. Maybe 1/4 of our builds.
If I run with the
--debug flag the build log grows so large that it wont load in my browser (~300 MB). I tried turning on
--debug for just one group of tests but the log was still very large and it seemed as if it turned on debugging for everything anyway (I could be wrong). Also, the group of tests that fails with this error is always different, so only having
--debug on for one group of tests isn’t likely to catch the error.
The tests groups are running in parallel across Jenkins nodes. Each test group, however is NOT run with --parallel.
According to what I’ve seen elsewhere online - exit value 143 usually means some other process is trying to terminate your process. I was unable to find something that confirmed that is what Gradle means by that exit value.
So, anyone know why this is happening? Let me know if there is more information I can provide. Thanks!