https://issues.apache.org/bugzilla/show_bug.cgi?id=55925
John Elion <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31146|0 |1 is obsolete| | --- Comment #2 from John Elion <[email protected]> --- Created attachment 31163 --> https://issues.apache.org/bugzilla/attachment.cgi?id=31163&action=edit Zip file with patch, 5 modified source files to Ant 1.9.2 release I wish to update the patch. In my own further testing: 1) I have still been seeing run-on lines in the Ant output; that is, I still am seeing lines that look like this: [junit] {1:com.test.classname4] Tests run: 2 Failed: 0 Errors: 0 Elapsed time: 0.952s [junit] {3:com.test.classname9] Tests run: 5 Failed: 0 Errors: 0 Elapsed time: 1.483s It appears that the OutputStream class in Java is not thread-safe, and that two unit test threads are occasionally writing Ant output at the same time. This happens more frequently with shorter tests. So far, in the cases I have seen, the lines aren't broken except immediately before the line terminator; there is generally a blank line after the run-on line. This make it harder to process the log afterwards. So I have replaced the calls to out.write/out.flush with a synchronized subroutine. I'm thinking that since each unit test only makes two calls on this subroutine - once at test start and once at test finish, this isn't a severe penalty. 2) I have moved the class name printed in the results line (since the result line for test X may not appear immediately after the line that says "Starting test X") to the end of the line. This makes the resulting 'results line' looks mostly like it did before, which should be easer on post-processing scripts. The patch is against the 1.9.2 release source. Only SummaryJUnitResultFormatter.java has changed from the previous patch. -- You are receiving this mail because: You are the assignee for the bug.
