openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r1022181 - in /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/dynamicschema: TestDynamicSchemas.java TestResWordEntity.java
Date Wed, 13 Oct 2010 16:39:42 GMT
Author: dwoods
Date: Wed Oct 13 16:39:41 2010
New Revision: 1022181

URL: http://svn.apache.org/viewvc?rev=1022181&view=rev
Log:
tests were not closing EMFs

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/dynamicschema/TestDynamicSchemas.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/dynamicschema/TestResWordEntity.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/dynamicschema/TestDynamicSchemas.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/dynamicschema/TestDynamicSchemas.java?rev=1022181&r1=1022180&r2=1022181&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/dynamicschema/TestDynamicSchemas.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/dynamicschema/TestDynamicSchemas.java
Wed Oct 13 16:39:41 2010
@@ -65,6 +65,7 @@ public class TestDynamicSchemas extends 
                 "openjpa.jdbc.SynchronizeMappings", "export", 
                 "openjpa.jdbc.SchemaFactory", "dynamic", RETAIN_DATA);
         validateTableName( derbyEMF );
+        closeEMF(derbyEMF);
     }
 
 
@@ -76,6 +77,7 @@ public class TestDynamicSchemas extends 
                 "openjpa.jdbc.SynchronizeMappings", "export", 
                 "openjpa.jdbc.SchemaFactory", "dynamic", RETAIN_DATA);
         validateTableName( db2EMF );
+        closeEMF(db2EMF);
     }
 
 
@@ -87,6 +89,7 @@ public class TestDynamicSchemas extends 
                 "openjpa.jdbc.SynchronizeMappings", "export", 
                 "openjpa.jdbc.SchemaFactory", "dynamic", RETAIN_DATA);
         validateTableName( oracleEMF );
+        closeEMF(oracleEMF);
     }
 
 
@@ -98,6 +101,7 @@ public class TestDynamicSchemas extends 
                 "openjpa.jdbc.SynchronizeMappings", "export", 
                 "openjpa.jdbc.SchemaFactory", "dynamic", RETAIN_DATA);
         validateTableName( accessEMF );
+        closeEMF(accessEMF);
     }
 
 
@@ -109,6 +113,7 @@ public class TestDynamicSchemas extends 
                 "openjpa.jdbc.SynchronizeMappings", "export", 
                 "openjpa.jdbc.SchemaFactory", "dynamic", RETAIN_DATA);
         validateTableName( sqlserverEMF );
+        closeEMF(sqlserverEMF);
     }
 
 
@@ -120,6 +125,7 @@ public class TestDynamicSchemas extends 
                 "openjpa.jdbc.SynchronizeMappings", "export", 
                 "openjpa.jdbc.SchemaFactory", "dynamic", RETAIN_DATA);
         validateTableName( mysqlEMF );
+        closeEMF(mysqlEMF);
     }
 
 
@@ -131,6 +137,7 @@ public class TestDynamicSchemas extends 
                 "openjpa.jdbc.SynchronizeMappings", "export", 
                 "openjpa.jdbc.SchemaFactory", "dynamic", RETAIN_DATA);
         validateTableName( postgresEMF );
+        closeEMF(postgresEMF);
     }
 
 
@@ -142,6 +149,7 @@ public class TestDynamicSchemas extends 
                 "openjpa.jdbc.SynchronizeMappings", "export", 
                 "openjpa.jdbc.SchemaFactory", "dynamic", RETAIN_DATA);
         validateTableName( informixEMF );
+        closeEMF(informixEMF);
     }
 
 
@@ -153,6 +161,7 @@ public class TestDynamicSchemas extends 
                 "openjpa.jdbc.SynchronizeMappings", "export", 
                 "openjpa.jdbc.SchemaFactory", "dynamic", RETAIN_DATA);
         validateTableName( sybaseEMF );
+        closeEMF(sybaseEMF);
     }
 
 
@@ -164,6 +173,7 @@ public class TestDynamicSchemas extends 
                 "openjpa.jdbc.SynchronizeMappings", "export", 
                 "openjpa.jdbc.SchemaFactory", "dynamic", RETAIN_DATA);
         validateTableName( firebirdEMF );
+        closeEMF(firebirdEMF);
     }
 
 

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/dynamicschema/TestResWordEntity.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/dynamicschema/TestResWordEntity.java?rev=1022181&r1=1022180&r2=1022181&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/dynamicschema/TestResWordEntity.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/dynamicschema/TestResWordEntity.java
Wed Oct 13 16:39:41 2010
@@ -56,7 +56,8 @@ public class TestResWordEntity extends S
         em.clear();
         re = em.find(ResWordEntity.class, pe.getId());
 
-        em.close();
+        closeEM(em);
+        closeEMF(emf);
     }
 
     public void testMultipleSchemafactories2() {
@@ -80,7 +81,8 @@ public class TestResWordEntity extends S
         em.clear();
         re = em.find(ResWordEntity.class, pe.getId());
 
-        em.close();
+        closeEM(em);
+        closeEMF(emf);
     }
 
     public void testMultipleSchemafactories3() {
@@ -103,7 +105,8 @@ public class TestResWordEntity extends S
         em.clear();
         re = em.find(ResWordEntity.class, pe.getId());
 
-        em.close();
+        closeEM(em);
+        closeEMF(emf);
     }
 
     public void testMultipleSchemafactories4() {
@@ -126,6 +129,7 @@ public class TestResWordEntity extends S
         em.clear();
         re = em.find(ResWordEntity.class, pe.getId());
 
-        em.close();
+        closeEM(em);
+        closeEMF(emf);
     }
 }



Mime
View raw message