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

clover-plugin: Ratio.getPercentageFloat() appears to handle N/0 improperly

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The clover-plugin Ratio.getPercentageFloat() does not seem to handle a ratio of N / 0 properly. It seems that this should be 100%, not 0%.

      It looks like https://github.com/jenkinsci/clover-plugin/commit/ddbf016c17933cba373903bb797f18172b422509 may have introduced this issue.

      I have created a pull on GitHub (https://github.com/jenkinsci/clover-plugin/pull/9).

      I have also added some tests for the Ratio.getPercentageFloat() in my pull request, but they are incomplete due to not being able to find documentation on the edge cases.

      I am willing to change the way the patch is assembled (if you want the testing broken into a different branch pull request, for example). I am also willing to flesh out the test for that method, I just need to know what the expected behavior should be.

        Attachments

          Activity

          Hide
          midlifexis Brian Wightman added a comment -

          This causes the clover-plugin to set the job status as not successful if there are no instances of a particular type of coverage class.

          Show
          midlifexis Brian Wightman added a comment - This causes the clover-plugin to set the job status as not successful if there are no instances of a particular type of coverage class.
          Hide
          marekparf Marek Parfianowicz added a comment -

          Pull request #9 has been merged into master in commit 8edab7de8d1186fb17c16bfa4e3c0a3b28114d19 on 2.06.2014. It was followed by two commits fixing a bug in Ratio.java class. Change has been shipped in Jenkins Clover Plugin version 4.4.0.

          Show
          marekparf Marek Parfianowicz added a comment - Pull request #9 has been merged into master in commit 8edab7de8d1186fb17c16bfa4e3c0a3b28114d19 on 2.06.2014. It was followed by two commits fixing a bug in Ratio.java class. Change has been shipped in Jenkins Clover Plugin version 4.4.0.

            People

            Assignee:
            marekparf Marek Parfianowicz
            Reporter:
            midlifexis Brian Wightman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: