From ebdc67029869b5ba7d99d993256ea6a404aecff8 Mon Sep 17 00:00:00 2001 From: Donald Woods Date: Wed, 13 Oct 2010 17:32:10 +0000 Subject: [PATCH] migrate testcase from depricated PersistenceTestCase to AbstractPersistenceTestCase git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1022204 13f79535-47bb-0310-9956-ffa450edef68 --- .../exception/TestParameterLogging.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/exception/TestParameterLogging.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/exception/TestParameterLogging.java index 9267d7d3b..4d8e05fd8 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/exception/TestParameterLogging.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/exception/TestParameterLogging.java @@ -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.EntityManagerFactory; 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 extends PersistenceTestCase { if (tran.isActive()) { tran.rollback(); } - if (em.isOpen()) { - em.close(); - } - if (emf.isOpen()) { - emf.close(); - } + closeEM(em); + closeEMF(emf); } }