Fix BasicHibernateAnnotationsTest
This commit is contained in:
parent
d67db86f73
commit
7b107539db
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.test.annotations.entity;
|
package org.hibernate.test.annotations.entity;
|
||||||
|
|
||||||
|
import javax.persistence.OptimisticLockException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Currency;
|
import java.util.Currency;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -16,7 +17,6 @@ import java.util.Set;
|
||||||
|
|
||||||
import org.hibernate.AnnotationException;
|
import org.hibernate.AnnotationException;
|
||||||
import org.hibernate.Hibernate;
|
import org.hibernate.Hibernate;
|
||||||
import org.hibernate.HibernateException;
|
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
|
@ -116,7 +116,7 @@ public class BasicHibernateAnnotationsTest extends BaseCoreFunctionalTestCase {
|
||||||
parallelTx.commit();
|
parallelTx.commit();
|
||||||
fail( "All optimistic locking should have make it fail" );
|
fail( "All optimistic locking should have make it fail" );
|
||||||
}
|
}
|
||||||
catch (HibernateException e) {
|
catch (OptimisticLockException e) {
|
||||||
if ( parallelTx != null ) parallelTx.rollback();
|
if ( parallelTx != null ) parallelTx.rollback();
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
|
Loading…
Reference in New Issue