I have a multi-module Android application and I am running Robolectric tests on one of my modules. The module that has the Robolectric tests fail (Hangs on running the test until it times out after 10 minutes) if it gets executed at the end, but if it is executed at the beginning it passes without any issues.
I have the following in my build.gadle
for this module:
unitTests.all {
maxHeapSize = "1024m"
}
based on recommendations from this doc. I also have the following environment properties in my config.yml
environment:
JVM_OPTS: -Xmx2024m
GRADLE_OPTS: -Xmx1048m -Dorg.gradle.daemon=false
GRADLE_OPTIONS: --no-daemon --max-workers 2 # This is done to prevent OOM on CI
This is what I get from the logs
> Task :wear:testDebugUnitTest
Too long with no output (exceeded 10m0s)