https://issues.apache.org/bugzilla/show_bug.cgi?id=54147
Priority: P2
Bug ID: 54147
Assignee: [email protected]
Summary: Creation of the test report (xml, plain) ends with a
java.lang.OutOfMemoryError exception
Severity: major
Classification: Unclassified
OS: All
Reporter: [email protected]
Hardware: PC
Status: NEW
Version: 1.8.4
Component: Core
Product: Ant
Created attachment 29601
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29601&action=edit
Patch for the DOMElementWriter class
Our Unit Test contains keeps failing with java.lang.OutOfMemory exception when
the test results are written into the XML/text file.
First problem was solved by applying the patch from patch from the
https://issues.apache.org/bugzilla/show_bug.cgi?id=45536.
But it still does not helped, and the exception is still thrown:
[epos junit] Exception in thread "main" java.lang.OutOfMemoryError: Java heap
space
[epos junit] at
java.lang.StringCoding$StringDecoder.decode(StringCoding.java:133)
[epos junit] at java.lang.StringCoding.decode(StringCoding.java:173)
[epos junit] at java.lang.StringCoding.decode(StringCoding.java:185)
[epos junit] at java.lang.String.<init>(String.java:570)
[epos junit] at java.lang.String.<init>(String.java:593)
[epos junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:547)
[epos junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
[epos junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
After a short investigation I have found, that the problem lies in the
conversion of the DOM representation into the XML/Text file, caused by multiple
allocation of the memory for storing of the string data of the CDATA element.
I have skipped the copy of the CDATA into the memory, the data will be written
directly into the output stream, instead (see the attached patch).
--
You are receiving this mail because:
You are the assignee for the bug.