You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2005/07/04 13:39:57 UTC

DO NOT REPLY [Bug 35476] - XMLLogger causes OutOfMemoryError

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35476>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35476





------- Additional Comments From stevel@apache.org  2005-07-04 13:39 -------
Well, there is nothing to prevent us from changing the generated XML and the
stylesheets. What may break is anyone using their own stylesheets.

For reference, in the distributed JUnit stuff I've done (I hope to demo this at
apachecon soon), I dont use dom/SAX; I just generate simple XML by hand,
escaping stuff where needed. It's cheap and limited, but works well.

The problem I had with the existing junit stuff was not memory consumption but
robustness: I wanted as much of the XML data written to file, so that if
something crashed, we would have more of a trace.

In ant, we stick the statistics at the top:
        rootElement.setAttribute(ATTR_TESTS, "" + suite.runCount());
        rootElement.setAttribute(ATTR_FAILURES, "" + suite.failureCount());
        rootElement.setAttribute(ATTR_ERRORS, "" + suite.errorCount());
        rootElement.setAttribute(ATTR_TIME, "" + (suite.getRunTime() / 1000.0));
whereas in my (custom) junit logging, I add a new element at the end of the run

        write("summary",
                a("tests", testCount)
                +
                a("failures", failureCount)
                + a("errors", errorCount),
                null, false);

        xmlFile.write(ROOT_CLOSE);
This leaves something like
<summary tests="4" failures="5" errors="0" ></summary>
at the end of the document.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org