From 73cbad1a160c97751dd00ce6a93876c9690b459f Mon Sep 17 00:00:00 2001 From: Donald Woods Date: Tue, 26 Oct 2010 18:28:38 +0000 Subject: [PATCH] test should call super.tearDown() for cleanup git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1027673 13f79535-47bb-0310-9956-ffa450edef68 --- .../persistence/kernel/TestPessimisticLocking.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/TestPessimisticLocking.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/TestPessimisticLocking.java index 6a134cfd0..a076cb4a2 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/TestPessimisticLocking.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/TestPessimisticLocking.java @@ -83,6 +83,7 @@ public class TestPessimisticLocking extends BaseKernelTest { return pm; } + @Override public void setUp() throws Exception { super.setUp(RuntimeTest1.class, RuntimeTest2.class, RuntimeTest3.class); @@ -101,12 +102,16 @@ public class TestPessimisticLocking extends BaseKernelTest { endEm(pm); } - public void tearDown() { + @Override + public void tearDown() throws Exception { try { - if (_factory != null) + if (_factory != null) { _factory.close(); + _factory = null; + } } catch (Exception e) { } + super.tearDown(); } /**