[hibernate-dev] Test hangs if an exception is thrown, due to unclosed transaction

Juraci Costa jcosta at redhat.com
Wed Dec 10 06:55:47 EST 2008


This is not new, but I realized that it is happening in trunk. We fixed in 3_2-related branches, so, I applied the same logic, but changing some things:

- It now marks the test as "fail" if the test case leaves a transaction opened. Of course, it also closes the transaction.
- It logs a warning message if the test hasn't closed the EM. 

I locally ran all tests under DB2 and PostgreSQL, and it seems it is working as expected. Please, let me know if you have any problems in seeing this patch committed. 

JIRA (includes patch): http://opensource.atlassian.com/projects/hibernate/browse/EJB-406

- Juca. 

More information about the hibernate-dev mailing list