[ 
https://issues.apache.org/jira/browse/KAFKA-15235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17748932#comment-17748932
 ] 

Eike Thaden commented on KAFKA-15235:
-------------------------------------

[~bmscomp] finally I was able to generate coverage reports. I guess my issues 
have to do with my hardware setup: I'm using an AMD Ryzen 9 7950X 16-Core 
Processor (i.e. 32 virtual cores) with 64 GB of RAM. If I run the coverage 
report generation according to the documentation, I test steps failing with 
OutOfMemory exceptions which prevents the generation of the reports. To me, it 
looks like too many parallel processes are spawned.

I tried to increase the maximum heap size to up to 8GB in build.gradle, with 
not effect. I succeeded creating the reports after I restricted the number of 
parallel workers: "./gradlew clients:reportCoverage --max-workers 4 
-PenableTestCoverage=true -Dorg.gradle.parallel=false".

I thought, the "org.gradle.parallel=false" should do that, but either this 
doesn't work or I misunderstood the concept.

> No test coverage reports for Java due to settings for Jacoco being 
> incompatible with Gradle 8.x
> -----------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-15235
>                 URL: https://issues.apache.org/jira/browse/KAFKA-15235
>             Project: Kafka
>          Issue Type: Bug
>          Components: unit tests
>    Affects Versions: 3.6.0
>            Reporter: Eike Thaden
>            Assignee: Said BOUDJELDA
>            Priority: Major
>              Labels: buid, coverage, gradle, tools
>             Fix For: 3.6.0, 3.5.2
>
>
> On current dev branch, gradle 8.x fails while trying to generate test 
> coverage reports as stated in the README, e.g. by running
> {code:java}
> ./gradlew clients:reportCoverage -PenableTestCoverage=true 
> -Dorg.gradle.parallel=false{code}
>  
> The error message states:
> {code:java}
> "Could not set unknown property 'enabled' for Report html of type 
> org.gradle.api.reporting.internal.TaskGeneratedSingleDirectoryReport"
> {code}
> In "build.gradle", the library "jacoco" which is used to generate test 
> coverage reports for the Java code is configured in two different places with 
> these settings:
>  
> {code:java}
> jacocoTestReport {
>     dependsOn tasks.test
>     sourceSets sourceSets.main
>     reports { 
>         html.enabled = true
>         xml.enabled = true        
>         csv.enabled = false    
>     }
> }
> {code}
>  
> With the latest version of jacoco, shipped with gradle 8.x, these config 
> options are not compatible anymore. A correct configuration might look like 
> like this:
>  
> {code:java}
> jacocoTestReport {
>     dependsOn tasks.test
>     sourceSets sourceSets.main
>     reports {
>         html {
>            required = true
>         }
>         xml {
>            required = true         
>         }
>         csv{
>           required = false
>         }
>     }
> }
> {code}
>  
> However, even with these settings being accepted by Gradle, I was unable to 
> generate any test coverage report. This might be due to some OOM issues, but 
> I tried a lots of settings including increasing the maximum heap for the JVM 
> gradle tasks without getting this to work.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to