Skip to content

Commit

Permalink
Fix JENKINS-14500
Browse files Browse the repository at this point in the history
- Added a check to see if there are ANY failures, if not then don't send an improvement email.
  • Loading branch information
slide committed Jul 20, 2012
1 parent 4e7e05a commit a82a1c9
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -17,12 +17,14 @@ public boolean trigger(AbstractBuild<?, ?> build) {
if (build.getPreviousBuild().getTestResultAction() == null)
return false;

int numCurrFailures = getNumFailures(build);

// The first part of the condition avoids accidental triggering for
// builds that aggregate downstream test results before those test
// results are available...
return build.getTestResultAction().getTotalCount() > 0 &&
getNumFailures(build) <
getNumFailures(build.getPreviousBuild());
numCurrFailures < getNumFailures(build.getPreviousBuild()) &&
numCurrFailures > 0;
}

@Override
Expand Down

0 comments on commit a82a1c9

Please sign in to comment.