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

shard / stage in pipeline test name cannot be disabled

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • xunit-plugin
    • None
    • jenkins 2.149
      xunit plugin 2.31
      junit plugin 1.26.1

      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.

          [JENKINS-55115] shard / stage in pipeline test name cannot be disabled

          Simon Weber created issue -
          Simon Weber made changes -
          Epic Link New: JENKINS-45818 [ 184028 ]

          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?

           

          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?  

          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.

          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 .

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

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

          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... simonmweber 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.
          Nikolas Falco made changes -
          Issue Type Original: Bug [ 1 ] New: Improvement [ 4 ]
          Nikolas Falco made changes -
          Resolution New: Won't Do [ 10001 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: