mirror of https://github.com/apache/openjpa.git
Make some part of the test database dependent because it verifies hardcoded Derby URL
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@739148 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d00a4e6eb9
commit
e47d83b051
|
@ -26,10 +26,12 @@ import javax.persistence.Persistence;
|
||||||
|
|
||||||
import org.apache.openjpa.conf.OpenJPAConfiguration;
|
import org.apache.openjpa.conf.OpenJPAConfiguration;
|
||||||
import org.apache.openjpa.enhance.TestEnhancementWithMultiplePUs;
|
import org.apache.openjpa.enhance.TestEnhancementWithMultiplePUs;
|
||||||
|
import org.apache.openjpa.jdbc.schema.DataSourceFactory;
|
||||||
import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
|
import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
|
||||||
import org.apache.openjpa.persistence.OpenJPAPersistence;
|
import org.apache.openjpa.persistence.OpenJPAPersistence;
|
||||||
import org.apache.openjpa.persistence.common.utils.AbstractTestCase;
|
import org.apache.openjpa.persistence.common.utils.AbstractTestCase;
|
||||||
import org.apache.openjpa.persistence.test.AllowFailure;
|
import org.apache.openjpa.persistence.test.AllowFailure;
|
||||||
|
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
|
@ -45,7 +47,7 @@ import junit.framework.TestCase;
|
||||||
* @author Pinaki Poddar
|
* @author Pinaki Poddar
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class TestEquivalentConfiguration extends TestCase {
|
public class TestEquivalentConfiguration extends SingleEMFTestCase {
|
||||||
private EntityManagerFactory emf;
|
private EntityManagerFactory emf;
|
||||||
|
|
||||||
private Properties _system;
|
private Properties _system;
|
||||||
|
@ -82,7 +84,6 @@ public class TestEquivalentConfiguration extends TestCase {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
super.setUp();
|
|
||||||
_system = backup();
|
_system = backup();
|
||||||
clear(_system);
|
clear(_system);
|
||||||
}
|
}
|
||||||
|
@ -328,6 +329,8 @@ public class TestEquivalentConfiguration extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
void verifyDatabaseConnection() {
|
void verifyDatabaseConnection() {
|
||||||
|
String driver = OpenJPAPersistence.cast(emf).getConfiguration().getConnectionDriverName();
|
||||||
|
|
||||||
EntityManager em = emf.createEntityManager();
|
EntityManager em = emf.createEntityManager();
|
||||||
em.getTransaction().begin();
|
em.getTransaction().begin();
|
||||||
em.flush();
|
em.flush();
|
||||||
|
|
Loading…
Reference in New Issue