[arquillian-issues] [JBoss JIRA] (ARQ-1684) Jacoco extension filters do not work as advertised

Bartosz Majsak (JIRA) issues at jboss.org
Thu Dec 22 08:25:00 EST 2016


     [ https://issues.jboss.org/browse/ARQ-1684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bartosz Majsak updated ARQ-1684:
--------------------------------
              Status: Pull Request Sent  (was: Open)
    Git Pull Request: https://github.com/arquillian/arquillian-extension-jacoco/pull/31


> Jacoco extension filters do not work as advertised
> --------------------------------------------------
>
>                 Key: ARQ-1684
>                 URL: https://issues.jboss.org/browse/ARQ-1684
>             Project: Arquillian
>          Issue Type: Bug
>          Components: Extension - Jacoco
>    Affects Versions: jacoco_1.0.0.Alpha6
>            Reporter: Rich DiCroce
>             Fix For: jacoco_1.0.0.next
>
>
> The Jacoco includes/excludes mechanism does not work the way the [1.0.0.Alpha5 release announcement|http://arquillian.org/blog/2012/11/27/arquillian-extension-jacoco-1-0-0-Alpha5/] implies it does. Specifically, the release announcement shows excluding a package and then including some sub-packages. This implies that includes have precedence over excludes, but that is not true. It's clear from looking at the source code that includes and excludes just get turned into filters that are all ANDed together. So if you have
> exclude some.package.*
> include some.package.foo.*
> then some.package.foo will not be included because the exclude for some.package will return false. Effectively, excludes have priority over includes.
> This would be fine if not for the fact that an "include everything" filter is automatically added. This, combined with exclusions having priority, breaks a key use case, namely: I want to exclude all packages that are not my own code. I can't just
> include my.package.*
> because of the automatic include all filter, and I can't
> exclude *
> include my.package.*
> because the exclude blocks out the include.
> Including everything is a problem because then so many classes have to be instrumented that the test just hangs and the archive never gets deployed. For me, this makes the Jacoco extension completely unusable.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the arquillian-issues mailing list