https://issues.apache.org/bugzilla/show_bug.cgi?id=56544

            Bug ID: 56544
           Summary: OutOfMemory error due to console logging
           Product: Ant
           Version: 1.9.4
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optional Tasks
          Assignee: [email protected]
          Reporter: [email protected]

In JUnitTestRunner#run method the following code is executed:

ByteArrayOutputStream errStrm = new ByteArrayOutputStream();
ByteArrayOutputStream outStrm = new ByteArrayOutputStream();

setupIOStreams(outStrm, errStrm);

these 2 output streams contain a byte buffer which is never cleared during the
execution of the test. If you have a test or a suite of tests which perform a
lot of console logging it will all add up to the content of the
ByteArrayOutputStream byte[], which will increase in size when necessary, due
to logging this happens.
This growing of this byte array will in the end lead to an OutOfMemoryError
when the remaining amount of memory has become to small. 
So all loggers which log (in)directly using a ConsoleAppender add to this
problem on logging on System.out.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to