Fix ImmutableNaturalIdTest

This commit is contained in:
Andrea Boriero 2016-04-27 11:38:24 +01:00 committed by Steve Ebersole
parent dc0033aa9d
commit 49514b92e3
2 changed files with 7 additions and 3 deletions

View File

@ -85,10 +85,11 @@ public class ImmutableNaturalIdTest extends AbstractJPATest {
fail();
}
catch ( PersistenceException p ) {
//expected
t.rollback();
}
u.setUserName( "steve" );
s.delete( u );
t.commit();
s.close();
}

View File

@ -6,6 +6,8 @@
*/
package org.hibernate.test.naturalid.immutable;
import javax.persistence.PersistenceException;
import org.junit.Test;
import org.hibernate.HibernateException;
@ -76,11 +78,12 @@ public class ImmutableNaturalIdTest extends BaseCoreFunctionalTestCase {
s.flush();
fail();
}
catch ( HibernateException he ) {
catch ( PersistenceException e ) {
//expected
t.rollback();
}
u.setUserName( "steve" );
s.delete( u );
t.commit();
s.close();
}