Fix ImmutableNaturalIdTest
This commit is contained in:
parent
dc0033aa9d
commit
49514b92e3
|
@ -85,10 +85,11 @@ public class ImmutableNaturalIdTest extends AbstractJPATest {
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
catch ( PersistenceException p ) {
|
catch ( PersistenceException p ) {
|
||||||
|
//expected
|
||||||
|
t.rollback();
|
||||||
}
|
}
|
||||||
u.setUserName( "steve" );
|
u.setUserName( "steve" );
|
||||||
s.delete( u );
|
s.delete( u );
|
||||||
t.commit();
|
|
||||||
s.close();
|
s.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.test.naturalid.immutable;
|
package org.hibernate.test.naturalid.immutable;
|
||||||
|
|
||||||
|
import javax.persistence.PersistenceException;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
|
@ -76,11 +78,12 @@ public class ImmutableNaturalIdTest extends BaseCoreFunctionalTestCase {
|
||||||
s.flush();
|
s.flush();
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
catch ( HibernateException he ) {
|
catch ( PersistenceException e ) {
|
||||||
|
//expected
|
||||||
|
t.rollback();
|
||||||
}
|
}
|
||||||
u.setUserName( "steve" );
|
u.setUserName( "steve" );
|
||||||
s.delete( u );
|
s.delete( u );
|
||||||
t.commit();
|
|
||||||
s.close();
|
s.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue