qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafael Schloming <rafa...@redhat.com>
Subject Re: Trunk Java-09-Unit Test Hang
Date Sat, 19 Jul 2008 20:18:47 GMT
Martin Ritchie wrote:
> 2008/7/16 Rafael Schloming <rafaels@redhat.com>:
>> Martin Ritchie wrote:
>>> Ok, I'm can't see why this has locked my JVM up.
>>> It appears as though the main thread is having difficulting doing the
>>> put but I can't see why.
>> Isn't there a known bug against IdentityHashMap for hanging on Java 1.5?
> I thought that had been fixed in 1.5.0_15. Unfortunately I don't
> recall if this was a 1.5 test run.
>>> Rafi, is there anyway to stop the tests buffering the output until the
>>> test end? or is it just the way that JUnit formatters work?
>> As far as I know this is just the way the JUnit formatters work, however
>> I've never looked into it in detail. I usually just add a file appender to
>> log4j-test.xml if I run into an issue like this.
> In which case we should add a FileAppender as part of our default as
> it is only in the rare race conditions do you want to know what has
> gone on up to that point. Adding the FileAppender after it has
> happened and hoping it will happen again is too late.
> I shall update the log4j-test.xml to have a FileAppender writing to
> our build directory.

I've modified QpidTestCase to redirect stdout and stderr to a file 
during the test run. This allows the output to be incrementally written, 
and avoids bufferring large amounts of log output in memory during the 
test run. (This was becoming a problem on some machines with the 
recently added protocol logging.)

You should be able to get the log output for a test at the following 


For example:


I did took a look at supplying a custom result formatter to see if I 
could avoid buffering all the output, however the formatter interface 
appears to pass in all the output as one string.

I hope this helps. I think it's nicer than logging everything to one big 
file since it's easier to narrow down to the relevant log output.


View raw message