[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5012) Improvement for test EntityTest.java
Stephan Palm (JIRA)
noreply at atlassian.com
Mon Mar 15 12:27:52 EDT 2010
Improvement for test EntityTest.java
------------------------------------
Key: HHH-5012
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5012
Project: Hibernate Core
Issue Type: Improvement
Components: annotations
Affects Versions: 3.5.0-CR-2
Reporter: Stephan Palm
Priority: Minor
The following tests could behave nicer on failures:
testUniqueConstraint
testColumnUnique
The database which I am writing a dialect for has no unique constraint.
When I execute those tests I get a RollbackException which is not the intended behavior.
The test tries to give a nice failure message,
{code}
tx.commit();
fail( "unique constraints not respected" );
{code}
but the later
{code}
finally {
if ( tx != null ) tx.rollback();
s.close();
}
{code}
creates an Exception which masks the Failure. This could be avoided by adding a tx = null;
{code}
tx.commit();
tx = null;
fail( "unique constraints not respected" );
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list