fix tests which were asserting stuff about JPA compliance for a non-JPA method
The JPA spec does not have anything to say about our beginTransaction() method
This commit is contained in:
parent
5cc6eed50a
commit
eec7b8ab11
|
@ -45,7 +45,8 @@ public class JpaComplianceAlreadyStartedTransactionTest extends BaseNonConfigCor
|
|||
Transaction tx = null;
|
||||
try {
|
||||
// A call to begin() with an active Tx should cause an IllegalStateException
|
||||
tx = s.beginTransaction();
|
||||
tx = s.getTransaction();
|
||||
tx.begin();
|
||||
}
|
||||
catch (Exception e) {
|
||||
if ( tx != null && tx.isActive() ) {
|
||||
|
|
|
@ -50,7 +50,8 @@ public class NonJpaComplianceAlreadyStartedTransactionTest extends BaseNonConfig
|
|||
public void noIllegalStateExceptionShouldBeThrownWhenBeginTxIsCalledWithAnAlreadyActiveTx() throws Exception {
|
||||
tm.begin();
|
||||
try (Session s = openSession()) {
|
||||
Transaction tx = s.beginTransaction();
|
||||
Transaction tx = s.getTransaction();
|
||||
tx.begin();
|
||||
try {
|
||||
s.persist( new TestEntity( "ABC" ) );
|
||||
tx.commit();
|
||||
|
|
Loading…
Reference in New Issue