openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r1022204 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/exception/TestParameterLogging.java
Date Wed, 13 Oct 2010 17:32:11 GMT
Author: dwoods
Date: Wed Oct 13 17:32:10 2010
New Revision: 1022204

URL: http://svn.apache.org/viewvc?rev=1022204&view=rev
Log:
migrate testcase from depricated PersistenceTestCase to AbstractPersistenceTestCase

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/exception/TestParameterLogging.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/exception/TestParameterLogging.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/exception/TestParameterLogging.java?rev=1022204&r1=1022203&r2=1022204&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/exception/TestParameterLogging.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/exception/TestParameterLogging.java
Wed Oct 13 17:32:10 2010
@@ -18,9 +18,6 @@
  */
 package org.apache.openjpa.persistence.exception;
 
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
 import java.util.regex.Pattern;
 
 import javax.persistence.EntityManager;
@@ -28,9 +25,9 @@ import javax.persistence.EntityManagerFa
 import javax.persistence.EntityTransaction;
 import javax.persistence.RollbackException;
 
-import org.apache.openjpa.persistence.test.PersistenceTestCase;
+import org.apache.openjpa.persistence.test.AbstractPersistenceTestCase;
 
-public class TestParameterLogging extends PersistenceTestCase {
+public class TestParameterLogging extends AbstractPersistenceTestCase {
 
     String _regex = ".*params=.*1,.*]";
 
@@ -63,12 +60,8 @@ public class TestParameterLogging extend
             if (tran.isActive()) {
                 tran.rollback();
             }
-            if (em.isOpen()) {
-                em.close();
-            }
-            if (emf.isOpen()) {
-                emf.close();
-            }
+            closeEM(em);
+            closeEMF(emf);
         }
     }
 



Mime
View raw message