|
The complete patch. Apply this to a CLEAN svn up; do not apply the failing-test patch first. Merged well at rev 1417. I have come to understand that I can split this patch in two; I can separate the concurrency issue into a separate issue, thereby reducing the overall footprint of the patch slightly. The concurrency issue only arises when you have concurrent construction of session scoped artifacts within the same session. In real life this is probably only an issue for quite few applications, and the chances of this occuring are slim. When running parallel tests, this happens all of the time, but can be solved by introducing a non-blocking session scope from within the MockContextLoader instead. Is there any chance I can make you reconsider the main concurrency fix for 3.0 if I split the patch it in two ? (I'm probably a few months late with this suggestion Enclosed is an updated version of the concurrency patches that apply cleanly on trunk release 2051. Apply patches within the org.springframework.test module, using patch -p1 Due to the mentioned workaround for deadlock issue wrt Session object, I will be making a separate issue for this problem. This patch now consists of three files with "2051" in the name. The two first are the main fix for concurrency issues. These two first patches do not support the use of "DirtiesContext" in a concurrent environment. DirtiesContext is supported with the third patch, although this third patch is more of an idea and you may consider accepting this too. The original "failing test" can still be used as evidence. The patch is being maintained at http://github.com/krosenvold/spring-test Just for the record, all the relevant bits and pieces necessary to support this patch are now released (aspectj 1.6.6), junit 4.8.1 (works from 4.7 but important concurrency bugs are fixed in 4.8.1). maven surefire2.5 support running with concurrent junit. This patch has also been running stably for quite some time in a number of projects. |
|||||||||||||||||||||||||||||||||||||||||||||
This is the failing test in isolation, can be applied to trunk of spring m3