Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57882

junit Test Result Age shows next build number

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: junit-plugin
    • Labels:
    • Environment:
      jenkins 2.179
      junit plugin 1.28
      linux, running behind apache server
    • Similar Issues:

      Description

      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 

       

        Attachments

        1. AfterSkipped.jpg
          AfterSkipped.jpg
          82 kB
        2. BeforeSkip.JPG
          BeforeSkip.JPG
          71 kB
        3. Skipped.jpg
          Skipped.jpg
          64 kB

          Issue Links

            Activity

            Hide
            sgjenkins Steve Graham added a comment -

            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.

            Show
            sgjenkins Steve Graham added a comment - 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.
            Hide
            sgjenkins Steve Graham added a comment - - edited

            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

            Show
            sgjenkins Steve Graham added a comment - - edited 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
            Hide
            sgjenkins Steve Graham added a comment -

            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.

            Show
            sgjenkins Steve Graham added a comment - 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.
            Hide
            sgjenkins Steve Graham added a comment - - edited

            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.

            Show
            sgjenkins Steve Graham added a comment - - edited 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.
            Hide
            sgjenkins Steve Graham added a comment -

            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.

            Show
            sgjenkins Steve Graham added a comment - 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.
            Hide
            zbynek Zbynek Konecny added a comment -

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

            Show
            zbynek Zbynek Konecny added a comment - Thanks for the investigation, I'll try to fix it soon.
            Hide
            sgjenkins Steve Graham added a comment -

            had to upgrade to version 1.29, only noticed since a test failed for the last 598 days when it was skipped in the last build and passed in the build previous to that.
            I went back to 1.27 and then screwed up all my warnings generations since there is a dependency in many other plugins for 1.29..
            Reloaded 1.29 but my warnings generation is still messed up - there are now no reported warnings.
            Hows it going with a fix?

            Show
            sgjenkins Steve Graham added a comment - had to upgrade to version 1.29, only noticed since a test failed for the last 598 days when it was skipped in the last build and passed in the build previous to that. I went back to 1.27 and then screwed up all my warnings generations since there is a dependency in many other plugins for 1.29.. Reloaded 1.29 but my warnings generation is still messed up - there are now no reported warnings. Hows it going with a fix?
            Hide
            sgjenkins Steve Graham added a comment -

            Any progress with this ?
            I have test results which have been skipped for 1346 test runs ( job number is #1345 ) - its not correct.
            I have hundreds of developers really making fun of the results and I have to continually explain what happens.
            Thanks..

            Show
            sgjenkins Steve Graham added a comment - Any progress with this ? I have test results which have been skipped for 1346 test runs ( job number is #1345 ) - its not correct. I have hundreds of developers really making fun of the results and I have to continually explain what happens. Thanks..

              People

              Assignee:
              zbynek Zbynek Konecny
              Reporter:
              sgjenkins Steve Graham
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: