HHH-8514 - EntityManager#createQuery(CriteriaQuery) should throw IAE rather than ISE
This commit is contained in:
parent
31f50f3280
commit
a4d4152204
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
package org.hibernate.jpa.test.criteria;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
|
@ -106,12 +107,13 @@ public class ManipulationCriteriaTest extends AbstractMetamodelSpecificTest {
|
|||
em.createQuery( updateCriteria ).executeUpdate();
|
||||
fail( "Expecting failure due to no assignments" );
|
||||
}
|
||||
catch (IllegalStateException ise) {
|
||||
catch (IllegalArgumentException iae) {
|
||||
// expected
|
||||
}
|
||||
|
||||
em.getTransaction().rollback(); // HHH-8442 changed to rollback since thrown ISE causes
|
||||
// transaction to be marked for rollback only.
|
||||
// changed to rollback since HHH-8442 causes transaction to be marked for rollback only
|
||||
assertTrue( em.getTransaction().getRollbackOnly() );
|
||||
em.getTransaction().rollback();
|
||||
em.close();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue