ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 2442] - Null pointer exception hanging unit tests in XMLJUnitResultFormatter.endTest
Date Mon, 08 Oct 2001 21:49:38 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2442>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2442

Null pointer exception hanging unit tests in XMLJUnitResultFormatter.endTest





------- Additional Comments From devajx@yahoo.com  2001-10-08 14:49 -------
I think this problem occurs because XMLJUnitResultFormatter is not re-entrant. 
If you have a test suite that runs a bunch of tests in multiple threads 
(junit.extensions.ActiveTestSuite) then the startTest method can be called in 
multiple threads, in which case you have a race condition as this method 
modifies two instance variables currentTest and lastTestStart.
A quick fix will be to modify the class to encapsulate these instance variables 
in java.lang.ThreadLocal objects.

Mime
View raw message