History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CACHE-209
Type: Task Task
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Lars Torunski
Reporter: Lars Torunski
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OSCache

Review: Handling junit failures in threads other than the main thread

Created: 12/Oct/05 01:28 AM   Updated: 01/Jun/08 02:32 AM
Component/s: None
Affects Version/s: 2.2 RC
Fix Version/s: 2.4.1


 Description  « Hide
JUnit test failures that occur in threads other than the main thread are not propagated to the test itself.

E.g. when looking at the problem mentioned in http://forums.opensymphony.com/thread.jspa?threadID=6334&tstart=0 the failures below are logged. However the tests themselves succeed!

junit.framework.AssertionFailedError: Thread should have blocked until a new cache entry was ready
at junit.framework.Assert.fail(Assert.java:47)
at com.opensymphony.oscache.base.TestConcurrency$GetEntry.run(TestConcurrency.java:301)
at java.lang.Thread.run(Thread.java:534)
junit.framework.AssertionFailedError: Thread should have blocked until a new cache entry was ready
at junit.framework.Assert.fail(Assert.java:47)
at com.opensymphony.oscache.base.TestConcurrency$GetEntry.run(TestConcurrency.java:301)
at java.lang.Thread.run(Thread.java:534)

Links:
http://today.java.net/pub/a/today/2003/08/06/multithreadedTests.html
http://www.clarkware.com/software/JUnitPerf.html

Taken from http://forums.opensymphony.com/thread.jspa?threadID=6955&tstart=0

 All   Comments   Change History      Sort Order:

Lars Torunski - [14/Jul/07 04:17 AM ]
one concurrent test case added, which should be improved in later versions