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

Junit test reports are dropped if they have a timestamp within the same second as another test report

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The problem is in this line of code:

      https://github.com/jenkinsci/junit-plugin/blob/master/src/main/java/hudson/tasks/junit/TestResult.java#L297

      If two test reports have the same timestamp field, one of them is ignored.  However, those timestamp fields are only accurate to the second.  We parallelize our test runs and so occasionally two different files will have the same timestamp for a given job. 

      Our workaround is to add a unique number to the timestamp field.

        Attachments

          Issue Links

            Activity

            Hide
            albatros Jes Andersen added a comment -

            One thing to consider while is perhaps a log message about the file being ignored and why, since it took our team quite a bit of debugging to figure out this being the root cause.

            We got hit really badly by this since we ran it in parallel with msbuild where each project generated a xunit file and around half of the projects shared the timestamp with others.

            Show
            albatros Jes Andersen added a comment - One thing to consider while is perhaps a log message about the file being ignored and why, since it took our team quite a bit of debugging to figure out this being the root cause. We got hit really badly by this since we ran it in parallel with msbuild where each project generated a xunit file and around half of the projects shared the timestamp with others.
            Hide
            khneal Kevin Neal added a comment -

            I've opened a PR to fix this issue:
            https://github.com/jenkinsci/junit-plugin/pull/120
            Builds are a bit backed up, but hopefully it will go through by tomorrow.

            Sanae Rosen Jes Andersen or anybody else, do you have time to review the PR to see if it will fix your use case?

            Show
            khneal Kevin Neal added a comment - I've opened a PR to fix this issue: https://github.com/jenkinsci/junit-plugin/pull/120 Builds are a bit backed up, but hopefully it will go through by tomorrow. Sanae Rosen Jes Andersen or anybody else, do you have time to review the PR to see if it will fix your use case?
            Hide
            khneal Kevin Neal added a comment -

            Version 1.30 released today includes the fix

            Show
            khneal Kevin Neal added a comment - Version 1.30 released today includes the fix

              People

              Assignee:
              khneal Kevin Neal
              Reporter:
              sanaerosen Sanae Rosen
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: