[JIRA] (JENKINS-57882) junit Test Result Age shows next build number

18 views
Skip to first unread message

steve.graham@siemens.com (JIRA)

unread,
Jun 6, 2019, 9:18:02 AM6/6/19
to jenkinsc...@googlegroups.com
Steve Graham created an issue
 
Jenkins / Bug JENKINS-57882
junit Test Result Age shows next build number
Issue Type: Bug Bug
Assignee: Unassigned
Components: junit-plugin
Created: 2019-06-06 13:17
Environment: jenkins 2.179
junit plugin 1.28
linux, running behind apache server
Labels: regression
Priority: Minor Minor
Reporter: Steve Graham

Test results are being processed with the jUnit plugin ( latest version )

The age displayed in the results shows the next build number

Test         Duration Age

myTest       0 ms    1035

and the specific test results are:

  • Failing for the past 1,035 builds (Since #0 )

This was build #1034, the next build will be #1035

In the previous build the test was Skipped 

#1032 Passed

#1033 Skipped for the past 1,034 builds (Since #0 )

#1034 Failing for the past 1,035 builds (Since #0 )

Possible Regression or Feature - I have never seen this before 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

steve.graham@siemens.com (JIRA)

unread,
Aug 26, 2019, 1:36:01 AM8/26/19
to jenkinsc...@googlegroups.com

steve.graham@siemens.com (JIRA)

unread,
Aug 26, 2019, 1:36:02 AM8/26/19
to jenkinsc...@googlegroups.com
Steve Graham commented on Bug JENKINS-57882
 
Re: junit Test Result Age shows next build number

This is becoming a real pain. Developers are receiving messages with "Failing for the last 1042 test runs ", failed since build #0 which is completely false.
As explained above, this happens after a test has been Skipped.
If the Skipped build is removed/deleted everything is back to normal again and the correct "Failing for the last 5 test runs" is displayed again.

steve.graham@siemens.com (JIRA)

unread,
Aug 26, 2019, 1:57:04 AM8/26/19
to jenkinsc...@googlegroups.com
Steve Graham updated an issue
Change By: Steve Graham
Attachment: AfterSkipped.jpg
Attachment: BeforeSkip.JPG
Attachment: Skipped.jpg

steve.graham@siemens.com (JIRA)

unread,
Aug 26, 2019, 1:59:02 AM8/26/19
to jenkinsc...@googlegroups.com
 
Re: junit Test Result Age shows next build number

When a build is skipped all Age results are set to "1"
( see attached pictures - build#513 was also skipped )

steve.graham@siemens.com (JIRA)

unread,
Aug 26, 2019, 2:01:02 AM8/26/19
to jenkinsc...@googlegroups.com
Steve Graham edited a comment on Bug JENKINS-57882
When a build is skipped all Age results are set to "1"
( see attached pictures - build#513 was also skipped )

Pictures show another example with builds 512/514/515

steve.graham@siemens.com (JIRA)

unread,
Mar 2, 2020, 3:09:03 AM3/2/20
to jenkinsc...@googlegroups.com

Further analysis:
Failed build shows <failedSince>642</failedSince>
Skipped build : <failedSince>0</failedSince>
all subsequent builds : <failedSince>0</failedSince>

The fix is:
For a skipped build, update the failed since to the previous value, do not set to zero.

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

steve.graham@siemens.com (JIRA)

unread,
Mar 2, 2020, 3:27:03 AM3/2/20
to jenkinsc...@googlegroups.com

junit plugin - Worked in version 1.27 - fails in 1.28
probably the fix for the stack overflow.

https://plugins.jenkins.io/junit/
Changelog
Version 1.28 (May 14 2019)
This plugin now requires Jenkins 2.138.4 or newer.

JENKINS-31660 - Do not load attempt to load test history for skipped tests. This fixes some cases where a StackOverflowError was being thrown.

steve.graham@siemens.com (JIRA)

unread,
Mar 2, 2020, 3:33:04 AM3/2/20
to jenkinsc...@googlegroups.com
Steve Graham edited a comment on Bug JENKINS-57882
junit plugin - Worked in version 1.27 - fails in 1.28
probably the fix for the stack overflow.

https://plugins.jenkins.io/junit/
Changelog
Version 1.28 (May 14 2019)
This plugin now requires Jenkins 2.138.4 or newer.

JENKINS-31660 - Do not load attempt to load test history for skipped tests. This fixes some cases where a StackOverflowError  was being thrown.


See:
https://github.com/jenkinsci/junit-plugin/pull/117
There are two methods that recompute the failedSince field, one of them handled skipped builds correctly, the other one did not. With this PR they will both use the same logic.

steve.graham@siemens.com (JIRA)

unread,
Mar 2, 2020, 3:35:02 AM3/2/20
to jenkinsc...@googlegroups.com
Steve Graham assigned an issue to Zbynek Konecny
 

Found your name from the list of changes to jUnit.
I reported this defect - it should be clear in the description of what is happening.
The failedSince is needed for the skipped and subsequent builds.

Change By: Steve Graham
Assignee: Zbynek Konecny

zbynek1729@gmail.com (JIRA)

unread,
Mar 10, 2020, 7:47:04 PM3/10/20
to jenkinsc...@googlegroups.com
Zbynek Konecny commented on Bug JENKINS-57882
 
Re: junit Test Result Age shows next build number

Thanks for the investigation, I'll try to fix it soon.

Reply all
Reply to author
Forward
0 new messages