Martin Ritchie wrote:
2008/7/16 Rafael Schloming <[EMAIL PROTECTED]>:
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 location:

build/results/<module>/TEST-<package>.<Class>.<testMethod>.{out,err}

For example:

TEST-org.apache.qpid.test.client.QueueBrowserAutoAckTest.testBrowsingEmptyQueue.err
TEST-org.apache.qpid.test.client.QueueBrowserAutoAckTest.testBrowsingEmptyQueue.out
TEST-org.apache.qpid.test.client.QueueBrowserAutoAckTest.testBrowsingWithSelector.err
TEST-org.apache.qpid.test.client.QueueBrowserAutoAckTest.testBrowsingWithSelector.out
TEST-org.apache.qpid.test.client.QueueBrowserAutoAckTest.testClosingBrowserMidReceiving.err
TEST-org.apache.qpid.test.client.QueueBrowserAutoAckTest.testClosingBrowserMidReceiving.out
TEST-org.apache.qpid.test.client.QueueBrowserAutoAckTest.testMultipleGetEnum.err
TEST-org.apache.qpid.test.client.QueueBrowserAutoAckTest.testMultipleGetEnum.out
TEST-org.apache.qpid.test.client.QueueBrowserAutoAckTest.testMultipleOverlappingGetEnum.err
TEST-org.apache.qpid.test.client.QueueBrowserAutoAckTest.testMultipleOverlappingGetEnum.out
TEST-org.apache.qpid.test.client.QueueBrowserAutoAckTest.testQueueBrowserMsgsRemainOnQueue.err
TEST-org.apache.qpid.test.client.QueueBrowserAutoAckTest.testQueueBrowserMsgsRemainOnQueue.out
TEST-org.apache.qpid.test.client.QueueBrowserAutoAckTest.txt
TEST-org.apache.qpid.test.client.QueueBrowserAutoAckTest.xml

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.

--Rafael

Reply via email to