Skip to content

Commit

Permalink
Test result page keeps identifying tests as age 1
Browse files Browse the repository at this point in the history
If a test has not been viewed, the age will keep being 1.
This is because getFailedSince()/failedSince is lazy loaded.
Without having viewed the CaseResult that method is never
called and the prev.failedSince returns '0' which may or may
not be accurate.
http://jenkins.361315.n4.nabble.com/Problem-with-Age-column-on-Test-Results-tab-td3172208.html
(cherry picked from commit bffca9c)
  • Loading branch information
JoelJ authored and olivergondza committed Jul 2, 2014
1 parent eb9cbea commit b813d47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/tasks/junit/CaseResult.java
Expand Up @@ -373,7 +373,7 @@ public int getFailedSince() {
if (failedSince==0 && getFailCount()==1) {
CaseResult prev = getPreviousResult();
if(prev!=null && !prev.isPassed())
this.failedSince = prev.failedSince;
this.failedSince = prev.getFailedSince();
else if (getOwner() != null) {
this.failedSince = getOwner().getNumber();
} else {
Expand Down

0 comments on commit b813d47

Please sign in to comment.