[
https://issues.apache.org/jira/browse/AURORA-822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14167061#comment-14167061
]
Bill Farner commented on AURORA-822:
------------------------------------
I suspect we're being affected by differences in jacoco and/or javac versions,
specifically with regards to synthetic methods included in anonymous classes by
the compiler:
https://github.com/jacoco/jacoco/wiki/FilteringOptions#filters-for-synthetic-compiler-constructs
In my coverage report, {{OfferQueueImpl$2}} shows coverage in its default
constructor, which trips the "class has coverage" check i added:
{noformat}
<class name="org/apache/aurora/scheduler/async/OfferQueue$OfferQueueImpl$2">
<method name="<init>"
desc="(Lorg/apache/aurora/scheduler/async/OfferQueue$OfferQueueImpl;)V"
line="201">
<counter type="INSTRUCTION" missed="0" covered="6"/>
<counter type="LINE" missed="0" covered="1"/>
<counter type="COMPLEXITY" missed="0" covered="1"/>
<counter type="METHOD" missed="0" covered="1"/>
</method>
<method name="apply"
desc="(Lorg/apache/aurora/scheduler/async/OfferQueue$OfferQueueImpl$HostOffer;)Lorg/apache/mesos/Protos$Offer;"
line="204">
<counter type="INSTRUCTION" missed="6" covered="0"/>
<counter type="LINE" missed="2" covered="0"/>
<counter type="COMPLEXITY" missed="1" covered="0"/>
<counter type="METHOD" missed="1" covered="0"/>
</method>
<counter type="INSTRUCTION" missed="6" covered="6"/>
<counter type="LINE" missed="2" covered="1"/>
<counter type="COMPLEXITY" missed="1" covered="1"/>
<counter type="METHOD" missed="1" covered="1"/>
<counter type="CLASS" missed="0" covered="1"/>
</class>
{noformat}
> Coverage metrics seem occasionally flaky
> ----------------------------------------
>
> Key: AURORA-822
> URL: https://issues.apache.org/jira/browse/AURORA-822
> Project: Aurora
> Issue Type: Bug
> Components: Build
> Reporter: Joshua Cohen
> Priority: Minor
> Attachments: jacocoTestReport.xml, jacocoTestReport.xml
>
>
> [~wfarner] reported a build failure re: newly added coverage:
> {noformat}
> * What went wrong:
> Execution failed for task ':jacocoTestReport'.
> > Thanks for adding the first test coverage to:
> > org/apache/aurora/scheduler/async/OfferQueue$OfferQueueImpl$2 please remove
> > it from the legacyClassesWithoutCoverage list. Expression: (coverage == 0).
> > Values: coverage = 6
> {noformat}
> However running the build locally neither I nor [~zmanji] were able to
> reproduce. Here's the sha I'm running from:
> {noformat}
> $ git log -2
> commit 3a2c17a0d861d624789aad7d7ddd447ab9b866ab
> Author: Joshua Cohen <[email protected]>
> Date: Wed Oct 8 17:11:24 2014 -0700
> Kill code to serve ApiBeta help pages that's no longer used now that the
> content is served directly.
> commit 18ae90569b9a5fda44d0f7a9ea59e8eee916408b
> Author: Zameer Manji <[email protected]>
> Date: Wed Oct 8 16:33:42 2014 -0700
> Blacklist org/apache/aurora/scheduler/http/api/ApiBeta$2 which has no
> coverage.
>
> Bugs closed: AURORA-819
>
> Reviewed at https://reviews.apache.org/r/26464/
> {noformat}
> I'm attaching my jacocoTestReport.xml for further investigation.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)