openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r1027694 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/company/CompanyModelTest.java
Date Tue, 26 Oct 2010 19:22:07 GMT
Author: dwoods
Date: Tue Oct 26 19:22:06 2010
New Revision: 1027694

URL: http://svn.apache.org/viewvc?rev=1027694&view=rev
Log:
some testcase cleanup

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/company/CompanyModelTest.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/company/CompanyModelTest.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/company/CompanyModelTest.java?rev=1027694&r1=1027693&r2=1027694&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/company/CompanyModelTest.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/company/CompanyModelTest.java
Tue Oct 26 19:22:06 2010
@@ -37,6 +37,7 @@ public abstract class CompanyModelTest 
     private static Map<Class,Class> factoryClasses;
     private Map<Class,Class> impls;
 
+    @Override
     public void setUp() {
         // make a map of the implementations based on the class names in
         // the current package of the test subclass
@@ -52,10 +53,18 @@ public abstract class CompanyModelTest 
         impls.put(IPartTimeEmployee.class, localClass("PartTimeEmployee"));
         impls.put(IProduct.class, localClass("Product"));
 
-        setUp(impls.values().toArray(new Class[impls.size()]));
+        super.setUp(impls.values().toArray(new Class[impls.size()]));
         checkModel();
     }
 
+    @Override
+    public void tearDown() throws Exception {
+        impls.clear();
+        impls = null;
+        factoryClasses = null;
+        super.tearDown();
+    }
+    
     private Class localClass(String name) {
         String pkg = getClass().getPackage().getName();
         try {
@@ -192,6 +201,7 @@ public abstract class CompanyModelTest 
                 assertNotNull(obs);
 
                 persist(obs.toArray());
+                decoder.close();
             } finally {
                 factoryClasses = null;
             }



Mime
View raw message