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
Checkstyle failing with bump pitest-maven from 1.8.1 to 1.9.0 #1045
Comments
Running
|
It seems that both pitest maven and pitest-junit5-plugin need to be bumped at the same time. When I did this locally, the build passed. |
Updated checkstyle PR, if it resolves then this issue this can be closed. I feel though that pitest's error reporting could be a bit better. I wouldn't expect it to tell me both plugins need to be updated but just saying |
There is a surviving mutation at checkstyle/checkstyle#11761 (comment) which was being killed before. It seems like this might be regression before this new version as I can confirm locally tests fail with the mutation applied and it is the same tests pitest reported being killed by in the old version. |
Comment I accidentally left on the PR reproduced below. I've taken a look at the surviving mutant. I managed to reproduce the issue once, but the mutant was killed on all subsequent runs. Looking at the code, I'm reasonable confident that this is an existing test order dependency issue in the checkstyle suite, rather than an issue introduced in pitest 1.9.0. The MESSAGE_QUERY_MAP map in XpathFileGeneratorAstFilter is static state, which will be modified by any test that executes accept. Depending on which tests have been run in the JVM before, the state required to make XpathFileGeneratorAstFilterTest pass may already be in MESSAGE_QUERY_MAP before the mutant is introduced (possibly as a result of XpathFileGeneratorAstFilterTest itself having been previously run). Although pitest aims to be fully deterministic, it cannot guarantee the same order of tests in every run. This is because the order is (partially) determined by test timings, which can be effected by external factors. Time outs due to (presumed) infinite loops also mean that pitest cannot gurantee that the same number of jvms launches occurs for each run. Assuming this is indeed an order dependency due to static state, it can be mitigated by ensuring the finishLocalSetup method of XpathFileGeneratorAstFilter is run after a test modifies the static state, or before a test executes that relies upon it. The simplest fix for this particular issue might be to add this to XpathFileGeneratorAstFilterTest
It's unfortunately a little messy as it needs to overcome the access restrictions on finishLocalSetup |
Thanks @hcoles . I added the changes and CI is passing now. I did not think this was an order issue but what you said makes sense. I think we are good now and this is fully resolved, but I wanted to point out my comment at #1045 (comment) as I did not see you mention it. |
Closing this as main issue is resolved |
Identified in bump PR at checkstyle/checkstyle#11761 ,
It is not clear what the issue is with this bump. Stack trace did not provide any details. From release notes it was said Maven Site Plugin should be a specific version but we are already on the recommended version.
Similar issue can be seen at checkstyle/checkstyle#11760 with isolated bump pitest-junit5-plugin from 0.16 to 1.0.0
The text was updated successfully, but these errors were encountered: