New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #6439: move powermock tests away from the normal tests #6445
Conversation
<!-- Conflicts with normal tests and pitest. | ||
See examples in https://github.com/checkstyle/checkstyle/issues/6439 --> | ||
<allow class="org.powermock.reflect.Whitebox" /> | ||
<allow class="org.mockito.internal.util.Checks" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are ok since they use reflection and not byte code hacking.
@@ -57,7 +57,7 @@ | |||
* configuration has changed. | |||
* | |||
*/ | |||
final class PropertyCacheFile { | |||
public final class PropertyCacheFile { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't tag the class for powermock since it is package private.
@@ -40,7 +40,7 @@ | |||
/** | |||
* Responsible for loading the contents of an import control configuration file. | |||
*/ | |||
final class ImportControlLoader extends XmlLoader { | |||
public final class ImportControlLoader extends XmlLoader { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't tag the class for powermock since it is package private.
src/test/java/com/puppycrawl/tools/checkstyle/internal/powermock/MainPowerTest.java
Show resolved
Hide resolved
/** | ||
* Non meaningful javadoc just to contain "noinspection" tag. | ||
* Till https://youtrack.jetbrains.com/issue/IDEA-187210 | ||
* @noinspection JUnitTestCaseWithNoTests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With powermock gone, the false positives went away too.
We got bunch of items to our ignore list, but what we get as benefits ? |
@romani The biggest benefit is the pitests run faster. We are talking 36.3 minutes versus 84.9 minutes, so that saves us 48 minutes. As always, I will continue to work on killing the list of mutants. Old Times:
New Times:
The longest running job is 5 minutes instead of 19 minutes. Second longest job is 4 minutes instead of 10 minutes. |
@romani I will work on killing some bigger gaps in this PR, starting with Edit: All powermock tests for |
Ok to merge |
@romani CI is green. Do you want to merge as 3 commits or want me to squash them? |
26c25c3
to
b61e644
Compare
Whatever. |
I squashed the commits and will merge when CI is done. |
Issue #6439
I am expecting pitest to fail until I add new suppressions.