Skip to content

Commit

Permalink
Fix JENKINS-17270
Browse files Browse the repository at this point in the history
  • Loading branch information
gboissinot committed Dec 28, 2013
1 parent 354cacf commit 0ce44ee
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -37,17 +37,15 @@ public Result getResultThresholdNumber(XUnitLog log, AbstractBuild<?, ?> build,
public Result getResultThresholdPercent(XUnitLog log, AbstractBuild<?, ?> build, TestResultAction testResultAction, TestResultAction previousTestResultAction) {

int count = testResultAction.getTotalCount();

int skippedCount = testResultAction.getSkipCount();
int percentSkipped = (skippedCount / count) * 100;
int percentSkipped = (count == 0)?0:(skippedCount / count) * 100;

int previousSkippedCount = 0;
if (previousTestResultAction != null) {
previousSkippedCount = previousTestResultAction.getSkipCount();
}
int newSkippedCount = skippedCount - previousSkippedCount;
int percentNewSkipped = (newSkippedCount / count) * 100;

int percentNewSkipped = (count == 0)?0:(newSkippedCount / count) * 100;

return getResultThresholdPercent(log, percentSkipped, percentNewSkipped);
}
Expand Down

0 comments on commit 0ce44ee

Please sign in to comment.