Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-68294

Plugin not failing the build even if minimumKillRatio is not met

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • pitmutation-plugin
    • None

      I have set the minimum kill ratio to 80% for oe of our project, the plugin creates and analysis's the report properly but wouldn't fail the build and would return Success no matter  if kill ratio is met or not.

          [JENKINS-68294] Plugin not failing the build even if minimumKillRatio is not met

          Darren added a comment -

          nor is killRatioMustImprove respected either. I tested a drop of 5% coverage and it still passes the build. The unit tests on this project punch through to protected constructors and as such false-pass these issues, but the real code appears to be faulty in that the constructor always sets killRatioMustImprove to false and minimumKillRatio to zero. the subsequent setters set the public variables to the new values but its too late as the build condition arrays were already set to 0+false.

           

          The commit that appears to have damaged this was in 1.0-18: Replace DataBoundConstructor with DataBoundSetter · jenkinsci/pitmutation-plugin@12635a9 · GitHub

          note by doing this the constructor lost its parameters and as such the conditions are now built too early. If the unit tests were changed at this time to reference the public APIs then the fault would have been seen. Instead the constructor was marked as protected, so that the unit tests would continue to pass without changes. 

          Darren added a comment - nor is killRatioMustImprove respected either. I tested a drop of 5% coverage and it still passes the build. The unit tests on this project punch through to protected constructors and as such false-pass these issues, but the real code appears to be faulty in that the constructor always sets killRatioMustImprove to false and minimumKillRatio to zero. the subsequent setters set the public variables to the new values but its too late as the build condition arrays were already set to 0+false.   The commit that appears to have damaged this was in 1.0-18: Replace DataBoundConstructor with DataBoundSetter · jenkinsci/pitmutation-plugin@12635a9 · GitHub note by doing this the constructor lost its parameters and as such the conditions are now built too early. If the unit tests were changed at this time to reference the public APIs then the fault would have been seen. Instead the constructor was marked as protected, so that the unit tests would continue to pass without changes. 

            gigasproule Benjamin Sproule
            amar930 Amarpreet Dieutt
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: