migrate testcase from depricated PersistenceTestCase to AbstractPersistenceTestCase

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1022204 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Donald Woods 2010-10-13 17:32:10 +00:00
parent 4f06ae4591
commit ebdc670298
1 changed files with 4 additions and 11 deletions

View File

@ -18,9 +18,6 @@
*/ */
package org.apache.openjpa.persistence.exception; package org.apache.openjpa.persistence.exception;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import javax.persistence.EntityManager; import javax.persistence.EntityManager;
@ -28,9 +25,9 @@ import javax.persistence.EntityManagerFactory;
import javax.persistence.EntityTransaction; import javax.persistence.EntityTransaction;
import javax.persistence.RollbackException; 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,.*]"; String _regex = ".*params=.*1,.*]";
@ -63,12 +60,8 @@ public class TestParameterLogging extends PersistenceTestCase {
if (tran.isActive()) { if (tran.isActive()) {
tran.rollback(); tran.rollback();
} }
if (em.isOpen()) { closeEM(em);
em.close(); closeEMF(emf);
}
if (emf.isOpen()) {
emf.close();
}
} }
} }