Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix JENKINS-16404
Added a check for the value of getFailCount if the child
reports did not have any fails.
  • Loading branch information
slide committed Jan 26, 2013
1 parent c5a317a commit 52dae3a
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -64,7 +64,7 @@ public boolean getDefaultSendToRequester() {
protected int getNumFailures(AbstractBuild<?, ?> build) {
AbstractTestResultAction a = build.getTestResultAction();
if (a instanceof AggregatedTestResultAction) {
int result = 0;
int result = 0;
AggregatedTestResultAction action = (AggregatedTestResultAction) a;
for (ChildReport cr : action.getChildReports()) {
if (cr.child.getParent().equals(build.getParent())) {
Expand All @@ -74,6 +74,10 @@ protected int getNumFailures(AbstractBuild<?, ?> build) {
}
}
}

if(result == 0 && action.getFailCount() > 0) {
result = action.getFailCount();
}
return result;
}
return a.getFailCount();
Expand Down

0 comments on commit 52dae3a

Please sign in to comment.