Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-2212

OutOfMemoryError raised when parsing files with huge stderr/stdout output in surefire-report-parser

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.2
    • 3.2.3
    • surefire-shared-utils
    • None

    Description

      While parsing large reports, we identified OutOfMemoryError being raised in the surefire-report-parser in case the test file contains large CDATA sections below system-err / system-out in the report.

      While this is using a SAX parser, it parses all element contents into a string and that can cause issues for large test reports.
      Proposed fix: only keep element contents in memory in case the value is used somewhere for the result.
      i.e. system-err / system-out is just discarded.

      Sample project which is demonstrating the issue by creating a huge dummy test report and then uses the parser:
      https://github.com/bisswanger/surefire-parser-sample (see README for details)

      Attachments

        Issue Links

          Activity

            People

              michael-o Michael Osipov
              bisswanger Ramon Bisswanger
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: