mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-13 14:44:48 +00:00
Fix ImmutableNaturalIdTest
This commit is contained in:
parent
dc0033aa9d
commit
49514b92e3
@ -85,10 +85,11 @@ public void testNaturalIdCheck() throws Exception {
|
||||
fail();
|
||||
}
|
||||
catch ( PersistenceException p ) {
|
||||
//expected
|
||||
t.rollback();
|
||||
}
|
||||
u.setUserName( "steve" );
|
||||
s.delete( u );
|
||||
t.commit();
|
||||
s.close();
|
||||
}
|
||||
|
||||
|
@ -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 void testNaturalIdCheck() throws Exception {
|
||||
s.flush();
|
||||
fail();
|
||||
}
|
||||
catch ( HibernateException he ) {
|
||||
catch ( PersistenceException e ) {
|
||||
//expected
|
||||
t.rollback();
|
||||
}
|
||||
u.setUserName( "steve" );
|
||||
s.delete( u );
|
||||
t.commit();
|
||||
s.close();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user