test should call super.tearDown() for cleanup

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1027673 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Donald Woods 2010-10-26 18:28:38 +00:00
parent d62d67fcd9
commit 73cbad1a16
1 changed files with 7 additions and 2 deletions

View File

@ -83,6 +83,7 @@ public class TestPessimisticLocking extends BaseKernelTest {
return pm; return pm;
} }
@Override
public void setUp() throws Exception { public void setUp() throws Exception {
super.setUp(RuntimeTest1.class, RuntimeTest2.class, RuntimeTest3.class); super.setUp(RuntimeTest1.class, RuntimeTest2.class, RuntimeTest3.class);
@ -101,12 +102,16 @@ public class TestPessimisticLocking extends BaseKernelTest {
endEm(pm); endEm(pm);
} }
public void tearDown() { @Override
public void tearDown() throws Exception {
try { try {
if (_factory != null) if (_factory != null) {
_factory.close(); _factory.close();
_factory = null;
}
} catch (Exception e) { } catch (Exception e) {
} }
super.tearDown();
} }
/** /**