test cleanup

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1027638 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Donald Woods 2010-10-26 16:40:30 +00:00
parent ee682d82ab
commit 8510080d45
8 changed files with 9 additions and 3 deletions

View File

@ -65,6 +65,7 @@ public class CacheLoadTest
@Override @Override
public void tearDown() throws Exception { public void tearDown() throws Exception {
closeEMF(emf); closeEMF(emf);
emf = null;
super.tearDown(); super.tearDown();
} }

View File

@ -106,7 +106,9 @@ public class TestDataCacheBehavesIdentical extends AbstractTestCase {
// HACK - need to manually close EMFs after all tests have run // HACK - need to manually close EMFs after all tests have run
if (TEST_COUNT >= 21) { if (TEST_COUNT >= 21) {
closeEMF(emfWithDataCache); closeEMF(emfWithDataCache);
emfWithDataCache = null;
closeEMF(emfWithoutDataCache); closeEMF(emfWithoutDataCache);
emfWithoutDataCache = null;
super.tearDown(); super.tearDown();
} }
} }

View File

@ -42,6 +42,7 @@ public class TestEntitiesAsKeys extends AbstractPersistenceTestCase {
public void tearDown() throws Exception { public void tearDown() throws Exception {
closeEMF(emf); closeEMF(emf);
emf = null; emf = null;
super.tearDown();
} }
public void populate() { public void populate() {

View File

@ -68,6 +68,7 @@ public class TestJPQL2Queries
throws Exception { throws Exception {
try { try {
_factory.close(); _factory.close();
_factory = null;
} catch (Exception e) { } catch (Exception e) {
} }

View File

@ -106,7 +106,7 @@ public class TestJPQL2ResultsAndResultClasses
public void tearDown() public void tearDown()
throws Exception { throws Exception {
_factory.close(); _factory.close();
_factory = null;
super.tearDown(); super.tearDown();
} }

View File

@ -95,7 +95,7 @@ public class TestJPQLRelationProjections
public void tearDown() public void tearDown()
throws Exception { throws Exception {
_factory.close(); _factory.close();
_factory = null;
super.tearDown(); super.tearDown();
} }

View File

@ -80,6 +80,7 @@ public class TestMutableParameters
throws Exception { throws Exception {
try { try {
_factory.close(); _factory.close();
_factory = null;
} catch (Exception e) { } catch (Exception e) {
} }

View File

@ -69,7 +69,7 @@ public class TestResultShapes extends AbstractTestCase {
public void tearDown() throws Exception { public void tearDown() throws Exception {
_broker.close(); _broker.close();
_broker = null;
super.tearDown(); super.tearDown();
} }