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

Better error handling for InvalidStateException in xuint plugin

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
      xunit 2.1.0
    • Similar Issues:

      Description

      After updating to the latest version of the xunit plugin we get random fails in one of our jobs which creates the test report xml manually.

      Unfortunately the originating exception is caught in XUnitProcessor.java:365 which leaves me with the following mostly not helpful stack strace:

      java.lang.IllegalStateException: Impossible to merge JUnit result to previous steps
      	at org.jenkinsci.plugins.xunit.XUnitProcessor.merge(XUnitProcessor.java:366)
      	at org.jenkinsci.plugins.xunit.XUnitProcessor.recordTestResult(XUnitProcessor.java:343)
      	at org.jenkinsci.plugins.xunit.XUnitProcessor.process(XUnitProcessor.java:155)
      	at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:127)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)
      	at hudson.security.ACL.impersonate(ACL.java:290)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      

      The originating exception plus its stack trace should be printed as well in order to allow the user resolving that error and/or submittig a bug against xunit (in case e.g. this is caused by some bug).

        Attachments

          Activity

          Hide
          nfalco Nikolas Falco added a comment -

          Now we use directly the method to perform merge of result without reflection

          Show
          nfalco Nikolas Falco added a comment - Now we use directly the method to perform merge of result without reflection
          Hide
          macdrega Joerg Schwaerzler added a comment -

          Sounds great , thanks for the fast fix. Can you already tell when this roughly will be available?

          Show
          macdrega Joerg Schwaerzler added a comment - Sounds great , thanks for the fast fix. Can you already tell when this roughly will be available?

            People

            Assignee:
            nfalco Nikolas Falco
            Reporter:
            macdrega Joerg Schwaerzler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: