openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r1021974 - in /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers: noschema/ xml/
Date Wed, 13 Oct 2010 02:01:34 GMT
Author: dwoods
Date: Wed Oct 13 02:01:32 2010
New Revision: 1021974

URL: http://svn.apache.org/viewvc?rev=1021974&view=rev
Log:
make sure tests cleanup EMs and EMFs

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/noschema/TestNoSchemaManualDelimId.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/noschema/TestNoSchemaManualDelimIdSeqGen.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/noschema/TestNoSchemaManualDelimitedJoinAnnotations.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimIdResultSets.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimIdSeqGen.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimInheritance.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimitedIdentifiers.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimitedJoinAnnotation.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/noschema/TestNoSchemaManualDelimId.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/noschema/TestNoSchemaManualDelimId.java?rev=1021974&r1=1021973&r2=1021974&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/noschema/TestNoSchemaManualDelimId.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/noschema/TestNoSchemaManualDelimId.java
Wed Oct 13 02:01:32 2010
@@ -48,6 +48,15 @@ public class TestNoSchemaManualDelimId e
         assertNotNull(em);
     }
 
+    @Override
+    public void tearDown() throws Exception {
+        if (em != null && em.isOpen()) {
+            em.close();
+            em = null;
+        }
+        super.tearDown();
+    }
+
     public void createEntityF() {
         entityF = new EntityF("fName");
         entityF.setNonDelimName("fNonDelimName");

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/noschema/TestNoSchemaManualDelimIdSeqGen.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/noschema/TestNoSchemaManualDelimIdSeqGen.java?rev=1021974&r1=1021973&r2=1021974&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/noschema/TestNoSchemaManualDelimIdSeqGen.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/noschema/TestNoSchemaManualDelimIdSeqGen.java
Wed Oct 13 02:01:32 2010
@@ -54,6 +54,17 @@ public class TestNoSchemaManualDelimIdSe
         }
     }
     
+    @Override
+    public void tearDown() throws Exception {
+        if (em != null && em.isOpen()) {
+            em.close();
+            em = null;
+        }
+        dict = null;
+        conf = null;
+        super.tearDown();
+    }
+
     public void createEntityE() {
         entityE = new EntityE("e name");
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/noschema/TestNoSchemaManualDelimitedJoinAnnotations.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/noschema/TestNoSchemaManualDelimitedJoinAnnotations.java?rev=1021974&r1=1021973&r2=1021974&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/noschema/TestNoSchemaManualDelimitedJoinAnnotations.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/noschema/TestNoSchemaManualDelimitedJoinAnnotations.java
Wed Oct 13 02:01:32 2010
@@ -64,6 +64,17 @@ public class TestNoSchemaManualDelimited
         dict = conf.getDBDictionaryInstance();
     }
     
+    @Override
+    public void tearDown() throws Exception {
+        if (em != null && em.isOpen()) {
+            em.close();
+            em = null;
+        }
+        dict = null;
+        conf = null;
+        super.tearDown();
+    }
+
     private void createCandD(int id) {
         entityC = new EntityC(id);
         entityC.setName("ec");

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimIdResultSets.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimIdResultSets.java?rev=1021974&r1=1021973&r2=1021974&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimIdResultSets.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimIdResultSets.java
Wed Oct 13 02:01:32 2010
@@ -61,6 +61,15 @@ public class TestXmlDelimIdResultSets 
     }
     
     @Override
+    public void tearDown() throws Exception {
+        if (em != null && em.isOpen()) {
+            em.close();
+            em = null;
+        }
+        super.tearDown();
+    }
+
+    @Override
     protected String getPersistenceUnitName() {
         return "delimited-identifiers-result-set-xml";
     }    

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimIdSeqGen.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimIdSeqGen.java?rev=1021974&r1=1021973&r2=1021974&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimIdSeqGen.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimIdSeqGen.java
Wed Oct 13 02:01:32 2010
@@ -53,6 +53,17 @@ public class TestXmlDelimIdSeqGen extend
     }
     
     @Override
+    public void tearDown() throws Exception {
+        if (em != null && em.isOpen()) {
+            em.close();
+            em = null;
+        }
+        dict = null;
+        conf = null;
+        super.tearDown();
+    }
+
+    @Override
     protected String getPersistenceUnitName() {
         return "delimited-identifiers-seq-gen-xml";
     }    

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimInheritance.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimInheritance.java?rev=1021974&r1=1021973&r2=1021974&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimInheritance.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimInheritance.java
Wed Oct 13 02:01:32 2010
@@ -53,6 +53,15 @@ public class TestXmlDelimInheritance ext
     }
     
     @Override
+    public void tearDown() throws Exception {
+        if (em != null && em.isOpen()) {
+            em.close();
+            em = null;
+        }
+        super.tearDown();
+    }
+
+    @Override
     protected String getPersistenceUnitName() {
         return "delimited-identifiers-inheritance-xml";
     }    

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimitedIdentifiers.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimitedIdentifiers.java?rev=1021974&r1=1021973&r2=1021974&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimitedIdentifiers.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimitedIdentifiers.java
Wed Oct 13 02:01:32 2010
@@ -42,6 +42,15 @@ public class TestXmlDelimitedIdentifiers
     }
     
     @Override
+    public void tearDown() throws Exception {
+        if (em != null && em.isOpen()) {
+            em.close();
+            em = null;
+        }
+        super.tearDown();
+    }
+
+    @Override
     protected String getPersistenceUnitName() {
         return "delimited-identifiers-xml";
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimitedJoinAnnotation.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimitedJoinAnnotation.java?rev=1021974&r1=1021973&r2=1021974&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimitedJoinAnnotation.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/xml/TestXmlDelimitedJoinAnnotation.java
Wed Oct 13 02:01:32 2010
@@ -59,6 +59,15 @@ public class TestXmlDelimitedJoinAnnotat
     }
     
     @Override
+    public void tearDown() throws Exception {
+        if (em != null && em.isOpen()) {
+            em.close();
+            em = null;
+        }
+        super.tearDown();
+    }
+
+    @Override
     protected String getPersistenceUnitName() {
         return "delimited-identifiers-joins-xml";
     }    



Mime
View raw message