diff --git a/testsuite/src/test/java/org/hibernate/test/legacy/MultiTableTest.java b/testsuite/src/test/java/org/hibernate/test/legacy/MultiTableTest.java index 91e581fe73..e9ea621841 100644 --- a/testsuite/src/test/java/org/hibernate/test/legacy/MultiTableTest.java +++ b/testsuite/src/test/java/org/hibernate/test/legacy/MultiTableTest.java @@ -609,6 +609,7 @@ public class MultiTableTest extends LegacyTestCase { s.close(); s = openSession(); + s.beginTransaction(); s.delete( s.load(Lower.class, id) ); s.getTransaction().commit(); s.close(); diff --git a/testsuite/src/test/java/org/hibernate/test/legacy/ParentChildTest.java b/testsuite/src/test/java/org/hibernate/test/legacy/ParentChildTest.java index 8cc4516101..0a4d417a9c 100644 --- a/testsuite/src/test/java/org/hibernate/test/legacy/ParentChildTest.java +++ b/testsuite/src/test/java/org/hibernate/test/legacy/ParentChildTest.java @@ -82,6 +82,7 @@ public class ParentChildTest extends LegacyTestCase { s.close(); s = openSession(); + s.beginTransaction(); s.replicate(baz, ReplicationMode.OVERWRITE); // HHH-2378 SessionImpl x = (SessionImpl)s; @@ -92,6 +93,7 @@ public class ParentChildTest extends LegacyTestCase { s.close(); s = openSession(); + s.beginTransaction(); s.replicate(baz, ReplicationMode.IGNORE); s.getTransaction().commit(); s.close(); @@ -1032,6 +1034,7 @@ public class ParentChildTest extends LegacyTestCase { if ( (getDialect() instanceof MySQLDialect) ) { session.connection().setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); } + session.getTransaction().begin(); // First, prime the fixture session to think the entity does not exist try {