From 2408ff7d9e4d8f16b29d3d393310680e6d93316f Mon Sep 17 00:00:00 2001 From: Mark Struberg Date: Sat, 10 Apr 2021 12:27:07 +0200 Subject: [PATCH] tests which do not commit are not likely to fail... --- .../java/org/apache/openjpa/persistence/TestOpenJPA2330.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/TestOpenJPA2330.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/TestOpenJPA2330.java index 1ed47f489..85e83f585 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/TestOpenJPA2330.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/TestOpenJPA2330.java @@ -39,6 +39,7 @@ public class TestOpenJPA2330 extends SingleEMFTestCase { public void testOpenJPA2330() { final EntityManager em = emf.createEntityManager(); + em.getTransaction().begin(); EntityA a = new EntityA(); EntityB b = new EntityB(a); // set back pointer @@ -49,8 +50,8 @@ public class TestOpenJPA2330 extends SingleEMFTestCase { b.getCs().add(c); em.persist(a); - em.persist(b); em.persist(c); + em.getTransaction().commit(); assertEquals(LoadState.LOADED, OpenJPAPersistenceUtil.isLoaded(b, "center"));