Github user BorisOsipov commented on the issue:

    https://github.com/apache/flink/pull/2836
  
    @zentol Yes plugin cannot detect out of box cross-module coverage, but 
there are some tricks how it could be done.
    
    I've implemented and tested one of them.
    I squash older commits and split my works to two commits.
    The first one adds coverage plugin and change surefire configuration.
    The second one adds:
    
    - new maven submodule for coverage report aggregation.
    - change shade maven plugin configuration. When tests run with coverage 
profile shaded jar doesn't replace original jar(shadedArtifactAttached=true). 
It needs because maven-shade-plugin changes class files and it makes impossible 
coverage reports aggregations, because jacoco requires the same classes on data 
collecting and report phases.
    
    Changes in shade configuration made some test broken:
    - `ClassLoaderITCase`
    - `ZooKeeperLeaderElectionITCase`
    - `JobManagerHACheckpointRecoveryITCase`
    
    I investigate that they cannot run correctly without shading and there is 
no way to fix it.
    I think it is not a big problem.
    
    So you can get full coverage report by running command `mvn clean install 
-Pcoverage -Dmaven.test.failure.ignore=true` and open 
`flink/flink-test-utils-parent/flink-test-utils-coverage/target/site/jacoco-aggregate/index.html`
    
    What do you think about these changes?
    I glad to answer you questions if you have


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to