Process 'Gradle Test Executor 2' finished with non-zero exit value 255

Hi All,

We are using GitLab for CI and Gradle is our build tool.

We were getting below error in test stage. However, we solved it by changing the runner. earlier we used dind runner for pipeline execution where we got below error. By using docker runner we fixed the issue.

But Now I need to find out RCA. Can anyone guide me what is exit value 255 means? what is the RCA for this issue? There is nothing else mentioned in logs so I’m not able to figure out RCA.

Process ‘Gradle Test Executor 2’ finished with non-zero exit value 255
1192 This problem might be caused by incorrect test process configuration.
1193 Please refer to the test execution section in the User Manual at https://docs.gradle.org/6.8.4-20210419220000+0000/userguide/java_testing.html#sec:test_execution

Exit codes per-se do not have any meaning.
It is almost always just in context of the thing you execute what it could mean.
If you for example have a test that calls System.exit(255) that could cause that.
Maybe try increasing the log level using --info or --debug to get more information about what is happening.

When we run with --stacktrace getting below logs:

Same build was passing in local, it was failing only in GitLab with dind runner, do we need to run build and test in 2 separate environments?

Process ‘Gradle Test Executor 2’ finished with non-zero exit value 255

1192 This problem might be caused by incorrect test process configuration.

1193 Please refer to the test execution section in the User Manual at https://docs.gradle.org/6.8.4-20210419220000+0000/userguide/java_testing.html#sec:test_execution

1194* Try:

1195Run with --debug option to get more log output. Run with --scan to get full insights.

1196* Exception is:

1197org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:mobily-co-to-nam:test’.

1198 at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$3(ExecuteActionsTaskExecuter.java:186)

That’s not what I advised. :wink: