[ https://issues.apache.org/jira/browse/SUREFIRE-2212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17792770#comment-17792770 ]
ASF GitHub Bot commented on SUREFIRE-2212: ------------------------------------------ bisswanger commented on PR #687: URL: https://github.com/apache/maven-surefire/pull/687#issuecomment-1838355882 @michael-o : thanks for the feedback. Added a corresponding unit test > OutOfMemoryError raised when parsing files with a lot of std-err information > in surefire-report-parser > ------------------------------------------------------------------------------------------------------ > > Key: SUREFIRE-2212 > URL: https://issues.apache.org/jira/browse/SUREFIRE-2212 > Project: Maven Surefire > Issue Type: Bug > Components: surefire-shared-utils > Affects Versions: 3.2.2 > Reporter: Ramon Bisswanger > Assignee: Michael Osipov > Priority: Major > Fix For: 3.x-candidate > > > 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) -- This message was sent by Atlassian Jira (v8.20.10#820010)