• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • junit-plugin
    • jenkins 2.179
      junit plugin 1.28
      linux, running behind apache server
    • 1.50

      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 

       

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

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

          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.

          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.

          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

          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

          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.

          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.

          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.

          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.

          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.

          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.

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

          Zbynek Konecny added a comment - Thanks for the investigation, I'll try to fix it soon.

          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?

          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?

          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..

          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..

          Steve Graham added a comment -

          Still broken in LTS 2.277.1

          Steve Graham added a comment - Still broken in LTS 2.277.1

          Zbynek Konecny added a comment - - edited

          sgjenkins this was released in JUnit 1.50 today

          The fix won't correct existing data, if a test is marked as failing since build 1, new builds will still show that it's failing since build 1. But after it's skipped once the age counter will reset.

          Zbynek Konecny added a comment - - edited sgjenkins this was released in JUnit 1.50 today The fix won't correct existing data, if a test is marked as failing since build 1, new builds will still show that it's failing since build 1. But after it's skipped once the age counter will reset.

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

              Created:
              Updated:
              Resolved: