-
Bug
-
Resolution: Fixed
-
Minor
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.
[JENKINS-19703] clover-plugin: Ratio.getPercentageFloat() appears to handle N/0 improperly
Description |
Original:
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 (noted below). 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. |
New:
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. |
Assignee | Original: Stephen Connolly [ stephenconnolly ] |
Workflow | Original: JNJira [ 151220 ] | New: JNJira + In-Review [ 177887 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Assignee | New: Marek Parfianowicz [ marekparf ] | |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
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.