Get OOM error when I run test on CircleCI, like this:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:testDebugUnitTest'.
> Process 'Gradle Test Executor 1' finished with non-zero exit value 137
* Try:
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.
Part of the configuration of my config.yml file:
version: 2
jobs:
build-and-test:
working_directory: ~/carepilot-android/
docker:
- image: circleci/android:api-25-alpha
environment:
JVM_OPTS: -Xmx3200m
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
steps:
- checkout
...
I tried changing the "environment" configuration:
environment:
TERM: dumb
_JAVA_OPTIONS: "-Xms512m -Xmx1024m"
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError" -Dorg.gradle.daemon=true'
or:
environment:
JAVA_TOOL_OPTIONS: -Xmx1024m
I still get the OOM error.
Please help or try to give some ideas how to fix this.