TEZ-4693: Migrate from proprietary atlassian clover code coverage plugin to JaCoCo#465
Conversation
tez-dag/pom.xml
Outdated
| <configuration> | ||
| <argLine>${test.jvm.args}</argLine> | ||
| <environmentVariables> | ||
| <LOG_DIRS>${test.log.dir}</LOG_DIRS> |
There was a problem hiding this comment.
There is no need to explicit surefire plugins in child pom. Moved LOG_DIRS to parent pom and used <environmentVariables combine.children="append"> to ensure the argline and other env variables defined in parent pom under surefire plugins are available to child pom.
pom.xml
Outdated
| <forkedProcessTimeoutInSeconds>900</forkedProcessTimeoutInSeconds> | ||
| <testFailureIgnore>true</testFailureIgnore> | ||
| <argLine>-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError</argLine> | ||
| <argLine>${test.jvm.args}</argLine> |
pom.xml
Outdated
| <testFailureIgnore>true</testFailureIgnore> | ||
| <argLine>-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError</argLine> | ||
| <argLine>${test.jvm.args}</argLine> | ||
| <argLine>@{argLine} -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -XX:+EnableDynamicAgentLoading ${test.jvm.args}</argLine> |
There was a problem hiding this comment.
Added @{argLine} because of https://www.jacoco.org/jacoco/trunk/doc/prepare-agent-mojo.html
and -XX:+EnableDynamicAgentLoading because of jdk 21 + mockito (even though I have not seen the warning in tez) but adding it is shouldn't be a problem.
| <configuration> | ||
| <rules> | ||
| <rule> | ||
| <element>BUNDLE</element> |
There was a problem hiding this comment.
|
💔 -1 overall
This message was automatically generated. |
|
@Aggarwal-Raghav : awesome contribution again! am I right to assume that the surefire argline related patches are not related to the introduction of the jacoco plugin? I'm struggling to find the connection: could you move argline fixes to a separate jira/patch? |
Thanks @abstractdog , if you mean
Without that the tez-dag tests The javaagent is not picked up
|
I mean all the |
|
yes, we can do that but then I have to add that {@argline} in 4 child pom's as well. Let me know if you want 2 JIRA, will make that change. Just confirm one more time. |
|
Will rebase once #467 is merged |
b57f87e to
68e3457
Compare
| * Install JAR in M2 cache : mvn install | ||
| * Deploy JAR to Maven repo : mvn deploy | ||
| * Run clover : mvn test -Pclover [-Dclover.license=${user.home}/clover.license] | ||
| * Run jacoco : mvn test -Pjacoco |
There was a problem hiding this comment.
I would appreciate a quick help here about where to find the jacoco report, othen than that, this looks good
There was a problem hiding this comment.
you mean add that info in BUILDING.txt that it's present in target/site/jacoco/ and to render run
python3 -m http.server 8080
There was a problem hiding this comment.
ah nevermind, it would break this list, it's fine this way
we can still add info later to a the apache webpage if we want to advertise this in Tez project
|
looks good to me, tried it in tez-api, +1, pending tests |
|
💔 -1 overall
This message was automatically generated. |




Code coverage using jacoco:
GO to
tez-api/target/site/jacocoand runpython -m http.server 8080to see the report onhttp://localhost:8080/