Bug #84 (closed)
Opened 18 years ago
Closed 18 years ago
QueryTest and Co. are broken in TestNg.
Reported by: | jamoore | Owned by: | jamoore |
---|---|---|---|
Priority: | minor | Cc: | |
Sprint: | n.a. | ||
Total Remaining Time: | n.a. |
Description
All subclasses of the Spring transaction-managing test are broken with testng. The configuration of the context is somehow going amiss.
ome.conditions.InternalException: Wrapped Exception: (org.springframework.transaction.IllegalTransactionStateException): Pre-bound JDBC Connection found - HibernateTransactionManager does not support running within DataSourceTransactionManager if told to manage the DataSource itself. It is recommended to use a single HibernateTransactionManager for all transactions on a single DataSource, no matter whether Hibernate or JDBC access. at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:430) at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:283) at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:234) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:93)
Change History (3)
comment:1 Changed 18 years ago by jmoore
- Status changed from new to assigned
comment:2 Changed 18 years ago by jmoore
r677 updates testng framework so it can be more easily run from Eclipse. This problem has been verified in Eclipse and Ant, but only when running multiple tests from testng.xml.
comment:3 Changed 18 years ago by anonymous
- Keywords changed from iteration2 to iteration2,testing
- Resolution set to fixed
- Status changed from assigned to closed
r683 cleans up tests and shows this as fixed. Currently some 127 tests are passing, 9 failing, and a dozen disabled (in server/).
http://tearesolutions.com/blog/?p=9 seems to be explain some of these problems. Specifically, that the mixing of direct JDBC and Hibernate managed calls can lead to problems. This has apparently surfaced with the TestNG-ification of our JUnit tests.