Skip to content
Permalink
Browse files

Fix JENKINS-14500

- 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 a82a1c9b2bbd9edd4fba78f95f012d8efe494a04
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/main/java/hudson/plugins/emailext/plugins/trigger/ImprovementTrigger.java
@@ -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

0 comments on commit a82a1c9

Please sign in to comment.
You can’t perform that action at this time.