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

Prashant Wason commented on HUDI-587:
-------------------------------------

The reason for this issue is the pom.xml configuration.

The jacoco plugin has been setup to create the agent configuration as the 
property "surefireArgLine". But that property is not used within the surefire 
plugin. Hence, when surefire runs the tests, it uses its "argLine" which has 
been set to "-Xmx1024m -XX:MaxPermSize=256m". The jacoco agent is not loaded in 
the tests and coverage report is not generated.

 

*jacoco plugin configuration*

<plugin>
 <groupId>org.jacoco</groupId>
...

<!--
 Sets the name of the property containing the settings
 for JaCoCo runtime agent.
 -->
 <propertyName>surefireArgLine</propertyName>

 

*surefire plugin configuration*

<plugin>
 <groupId>org.apache.maven.plugins</groupId>

...
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>

 

 

> Jacoco coverage report is not generated
> ---------------------------------------
>
>                 Key: HUDI-587
>                 URL: https://issues.apache.org/jira/browse/HUDI-587
>             Project: Apache Hudi (incubating)
>          Issue Type: Bug
>            Reporter: Prashant Wason
>            Priority: Minor
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> When running tests, the jacoco coverage report is not generated. The jacoco 
> plugin is loaded, it sets the correct Java Agent line, bit it fails to find 
> the execution data file after tests complete.
> Example:
> mvn test -Dtest=TestHoodieActiveTimeline
> ...
> 22:42:40 [INFO] — jacoco-maven-plugin:0.7.8:prepare-agent (pre-unit-test) @ 
> hudi-common —
>  22:42:40 [INFO] *surefireArgLine set to 
> javaagent:/home/pwason/.m2/repository/org/jacoco/org.jacoco.agent/0.7.8/org.jacoco.agent-0.7.8-runtime.jar=destfile=/home/pwason/work/java/incubator-hudi/hudi-common/target/coverage-reports/jacocout.exec*
> *...*
> 22:42:49 [INFO] — jacoco-maven-plugin:0.7.8:report (post-unit-test) @ 
> hudi-common —
>  22:42:49 [INFO] *Skipping JaCoCo execution due to missing execution data 
> file.*
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to