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

shard / stage in pipeline test name cannot be disabled

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
      jenkins 2.149
      xunit plugin 2.31
      junit plugin 1.26.1
    • Similar Issues:

      Description

      Newer versions of the xdist plugin set pipeline information like parallel branch and stage into the test name itself (I believe as of https://issues.jenkins-ci.org/browse/JENKINS-45826).

      This is helpful in some cases, but can cause problems:

      • upgrading from an older version breaks test history (since its name has changed)
      • in situations where branch isn't relevant to the results (eg parallelizing a test suite with dynamically-named branches) it's difficult to visually group failing tests, since they're broken up by branch name

      So, I'd like to disable this behavior, but as far as I can tell it can't currently be done. Using step([$class: 'XUnitPublisher' instead of xunit([... is close, but also seems to cause race conditions such as:

      java.util.ConcurrentModificationException
              at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
              at java.util.ArrayList$Itr.next(ArrayList.java:851)
              at hudson.tasks.junit.TestResult.tally(TestResult.java:705)
              at hudson.tasks.junit.TestResult.merge(TestResult.java:319)
      

      Interestingly, this naming behavior only happens on one of two of our Jenkins instances, despite the core + plugin versions all matching, running identical pipeline code, and processing identical xml. I'm not sure why that'd be.

        Attachments

          Activity

          Hide
          macetw macetw added a comment -

          My build is experiencing this, ConcurrentModificationException inside XUnitPublisher, but I'm not sure how I got here in the first place. Can you offer any workaround?

           

          Show
          macetw macetw added a comment - My build is experiencing this, ConcurrentModificationException inside XUnitPublisher, but I'm not sure how I got here in the first place. Can you offer any workaround?  
          Hide
          simonmweber Simon Weber added a comment -

          I don't think it's really related to the original issue - I don't even know if $class: XUnitPublisher is a supported interface - but for what it's worth I haven't seen issues once switching to the new xunit( syntax on the latest release.

          To get back on topic, I restored the old naming behavior by passing null instead of pipelineTestDetails here.

          Show
          simonmweber Simon Weber added a comment - I don't think it's really related to the original issue - I don't even know if $class: XUnitPublisher is a supported interface - but for what it's worth I haven't seen issues once switching to the new xunit( syntax on the latest release. To get back on topic, I restored the old naming behavior by passing null instead of pipelineTestDetails here .
          Hide
          nfalco Nikolas Falco added a comment - - edited

          macetw your issue is not releated with this defect, in the case any ConcurrentModificationException is related on how junit (not xunit) plugin handle internal list, but with so few details...

          Simon Weber XUnitPublisher is a supported way but you are using reflection that means that any chages will break your system. The xunit annotation was moved to a different step due very requested feature.
          You do not have issue with the standard publisher step, so I have to think if introduce some attribute to discard pipeline informations or add new pipeline symbol on the publisher.

          Show
          nfalco Nikolas Falco added a comment - - edited macetw your issue is not releated with this defect, in the case any ConcurrentModificationException is related on how junit (not xunit) plugin handle internal list, but with so few details... Simon Weber XUnitPublisher is a supported way but you are using reflection that means that any chages will break your system. The xunit annotation was moved to a different step due very requested feature. You do not have issue with the standard publisher step, so I have to think if introduce some attribute to discard pipeline informations or add new pipeline symbol on the publisher.

            People

            Assignee:
            nfalco Nikolas Falco
            Reporter:
            simonmweber Simon Weber
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: