From e175b242f9f68d1d57e2af092117b3169201964c Mon Sep 17 00:00:00 2001 From: Donald Woods Date: Wed, 13 Oct 2010 16:06:49 +0000 Subject: [PATCH] testcase wasn't committing/closing some EMs, so use new closeEM() helper git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1022163 13f79535-47bb-0310-9956-ffa450edef68 --- .../persistence/generationtype/TestGeneratedValues.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGeneratedValues.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGeneratedValues.java index bd64527a1..8274bc13a 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGeneratedValues.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGeneratedValues.java @@ -66,6 +66,7 @@ public class TestGeneratedValues extends SingleEMFTestCase { assertFalse(gv.getUuidhex().equals(gv2.getUuidhex())); assertFalse(gv.getUuidT4hex().equals(gv2.getUuidT4hex())); assertFalse(gv.getUuidT4string().equals(gv2.getUuidT4string())); + closeEM(em); } public void testInitialValues() { @@ -83,6 +84,8 @@ public class TestGeneratedValues extends SingleEMFTestCase { } catch (EntityExistsException eee) { // also ok return; + } finally { + closeEM(em); } // should not get here... @@ -105,6 +108,8 @@ public class TestGeneratedValues extends SingleEMFTestCase { } catch (EntityExistsException eee) { // also ok return; + } finally { + closeEM(em); } // should not get here... @@ -124,6 +129,8 @@ public class TestGeneratedValues extends SingleEMFTestCase { } catch (InvalidStateException ise) { // expected result return; + } finally { + closeEM(em); } // should not get here... @@ -154,6 +161,7 @@ public class TestGeneratedValues extends SingleEMFTestCase { em.getTransaction().commit(); assertNotEquals(0, gv.getCustomSeqWithIndirectionField()); + closeEM(em); } public void testUUIDGenerators() { @@ -199,6 +207,7 @@ public class TestGeneratedValues extends SingleEMFTestCase { assertTrue(gv.getField() == gv2.getField()); assertTrue(gv.getUuidhex().equals(gv2.getUuidhex())); assertTrue(gv.getUuidT4hex().equals(gv2.getUuidT4hex())); + closeEM(em); } /*