-
Notifications
You must be signed in to change notification settings - Fork 52
Switching from Jacoco to Kover is having OOM issues #739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, Also, what do you mean by "switched from JaCoCo to Kover"? |
Its erroring when running this task which is within Output is something like this
The line of code that OOM is random when the system determines its out of memory I think per my command having an app: before it that it means its only running on the app module. I really only have that and a very small lint module. I believe I am running the tests only for the app module as my command is app:koverHtmlReportDebug Yes I was using the jacoco plugin before and am trying to convert to kover org.jacoco:org.jacoco.core:0.8.12 It is configured to run the same unit tests so testDebugUnitTest My config looked like this
|
And if you try to use JaCoCo in Kover Plugin, the error will not be reproduced? kover {
useJacoco()
} |
It repeatedly gives this error rather than running the unit tests |
Is the JaCoCo plugin disabled at the same time? |
I removed all of the existing jacoco code. Do I need to keep that in there? |
Is the JaCoCo plugin applied, if it is applied, it is in the list of plugins, for example
|
plugins { |
You don't need to add it, on the contrary, I clarified that two plugins should not be used at the same time. Just judging by the error, it looked like the instrumentation had been done twice. |
Ahh yeah it was not there. I have these lines of code in my build.gradle that basically seems to be implicitly adding code coverage stuff that conflicts with your library as you say to not do that. enableUnitTestCoverage = true This was the main problem of useJacoco() not working. Note without useJacoco it still does not work. Returns OOM issues. I deleted all of my gradle caches(locally to my app and to my user profile on my mac ~/.gradle. Note that with useJacoco it does not give OOM errors
|
@DavidCorrado, a new JaCoCo version was recently released, it contains support for inline functions. if you specify |
Describe the bug
So I am trying to convert from Jacoco to Kover but just simply doing that and running this command
./gradlew clean app:koverHtmlReportDebug -PenableKover
(Not using this work around to not impact testDebugUnitTests #531)
The problem is we have over 3000 unit tests and it gives OOM errors.
java.lang.OutOfMemoryError
It might be difficult to get an example to replicate this issue. I imagine I am doing something that is causing a large amount of memory to be used via the tests but its really not easy to troubleshoot.
But on top of that if this works on Jacoco would you expect it to work with Kover?
Note if I delete around 20 screens of unit tests the task succeds. I am running this on an Android compose single module app. I think the compose unit tests likely take more memory.
But anyways. I tried to play around with gradle.properties and set parellel to false(org.gradle.parallel,org.gradle.configureondemand,org.gradle.caching) Also I have a 64 GB ram machine so I tried all numbers up to 50 GB of ram and it did not work.
Also I replicated this on CI on gitlab.
Here are some potentially related issues
https://github.com/search?q=repo%3AKotlin%2Fkotlinx-kover+memory&type=issues
Thanks for reviewing.
The text was updated successfully, but these errors were encountered: