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

problem with empty junit xml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • junit-plugin
    • None
    • Platform: All, OS: All

      This is with hudson version 1.143. When a test times out in junit, it produces
      an empty test xml file. Earlier, I think hudson used to ignore this which was
      also not right but currently it marks the whole build as failure with following
      error. I think it should recognize this as bad/failing test.

      FATAL: remote file operation failed
      hudson.util.IOException2: remote file operation failed
      at hudson.FilePath.act(FilePath.java:276)
      at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:52)
      at hudson.model.Build$RunnerImpl.post2(Build.java:138)
      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:243)
      at hudson.model.Run.run(Run.java:595)
      at hudson.model.Build.run(Build.java:103)
      at hudson.model.ResourceController.execute(ResourceController.java:66)
      at hudson.model.Executor.run(Executor.java:62)

      Caused by: hudson.util.IOException2: Failed to read
      /home/test_hudson/hudson_workspace/workspace/test_junit/reports/blank-junit.xml
      at hudson.tasks.junit.TestResult.parse(TestResult.java:119)
      at hudson.tasks.junit.TestResult.parse(TestResult.java:83)
      at hudson.tasks.junit.TestResult.<init>(TestResult.java:66)
      at hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:67)
      at hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:52)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:997)
      at hudson.remoting.UserRequest.perform(UserRequest.java:69)
      at hudson.remoting.UserRequest.perform(UserRequest.java:23)
      at hudson.remoting.Request$2.run(Request.java:178)
      at
      java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      at java.lang.Thread.run(Thread.java:595)

      Caused by: org.dom4j.DocumentException: Error on line -1 of document : Premature
      end of file. Nested exception: Premature end of file.
      at org.dom4j.io.SAXReader.read(SAXReader.java:482)
      at org.dom4j.io.SAXReader.read(SAXReader.java:264)
      at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:38)
      at hudson.tasks.junit.TestResult.parse(TestResult.java:111)

      Regards,
      Prabhat

            Unassigned Unassigned
            prabhatjha prabhatjha
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: