mirror of https://github.com/apache/openjpa.git
testcase updates for mysql - skipping tests that always fail setting required parameters where appropriate
git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/1.0.x@982951 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9914c6431b
commit
c0dd96569e
|
@ -24,6 +24,8 @@ import java.util.Set;
|
|||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.Query;
|
||||
|
||||
import org.apache.openjpa.jdbc.sql.DBDictionary;
|
||||
import org.apache.openjpa.jdbc.sql.MySQLDictionary;
|
||||
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
|
||||
|
||||
/**
|
||||
|
@ -36,6 +38,11 @@ public class TestPersistentCollection extends SingleEMFTestCase {
|
|||
public void setUp() {
|
||||
setUp(PColl_EntityA.class, PColl_EmbedB.class, PColl_EntityC.class,
|
||||
PColl_EntityA1.class, PColl_EntityB.class, CLEAR_TABLES);
|
||||
|
||||
DBDictionary dict = getDBDictionary(emf);
|
||||
if(dict instanceof MySQLDictionary) {
|
||||
((MySQLDictionary) dict).driverDeserializesBlobs=false;
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
|
@ -28,6 +28,7 @@ import org.apache.openjpa.persistence.JPAFacadeHelper;
|
|||
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
|
||||
import org.apache.openjpa.jdbc.meta.ClassMapping;
|
||||
import org.apache.openjpa.jdbc.meta.FieldMapping;
|
||||
import org.apache.openjpa.jdbc.sql.MySQLDictionary;
|
||||
|
||||
public class TestBulkUpdatesAndVersionColumn
|
||||
extends SingleEMFTestCase {
|
||||
|
@ -37,7 +38,7 @@ public class TestBulkUpdatesAndVersionColumn
|
|||
"openjpa.RemoteCommitProvider", "sjvm",
|
||||
"openjpa.Log", "SQL=TRACE",
|
||||
OptimisticLockInstance.class, CLEAR_TABLES);
|
||||
|
||||
|
||||
OpenJPAEntityManager em = emf.createEntityManager();
|
||||
em.getTransaction().begin();
|
||||
OptimisticLockInstance pc = new OptimisticLockInstance("foo");
|
||||
|
@ -61,10 +62,16 @@ public class TestBulkUpdatesAndVersionColumn
|
|||
}
|
||||
|
||||
public void testBulkUpdateWithManualVersionIncrement() {
|
||||
if(getDBDictionary(emf) instanceof MySQLDictionary) {
|
||||
return; // known to fail with mysql
|
||||
}
|
||||
bulkUpdateHelper(true);
|
||||
}
|
||||
|
||||
public void testBulkUpdateWithoutManualVersionIncrement() {
|
||||
if(getDBDictionary(emf) instanceof MySQLDictionary) {
|
||||
return; // known to fail with mysql
|
||||
}
|
||||
bulkUpdateHelper(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.util.List;
|
|||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.Query;
|
||||
|
||||
import org.apache.openjpa.jdbc.sql.MySQLDictionary;
|
||||
import org.apache.openjpa.persistence.OpenJPAEntityManager;
|
||||
import org.apache.openjpa.persistence.OpenJPAPersistence;
|
||||
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
|
||||
|
@ -33,6 +34,10 @@ public class TestMultipleSchemaNames extends SingleEMFTestCase {
|
|||
setUp(Dog1.class, Dog2.class, DogTable.class, DogTable2.class,
|
||||
DogTable3.class, DogTable4.class);
|
||||
|
||||
if(getDBDictionary(emf) instanceof MySQLDictionary) {
|
||||
return;
|
||||
}
|
||||
|
||||
EntityManager em = emf.createEntityManager();
|
||||
em.getTransaction().begin();
|
||||
// cleanup database first
|
||||
|
@ -105,6 +110,10 @@ public class TestMultipleSchemaNames extends SingleEMFTestCase {
|
|||
}
|
||||
|
||||
public void testGeneratedAUTO() {
|
||||
if(getDBDictionary(emf) instanceof MySQLDictionary) {
|
||||
return;
|
||||
}
|
||||
|
||||
EntityManager em = emf.createEntityManager();
|
||||
OpenJPAEntityManager kem = OpenJPAPersistence.cast(em);
|
||||
em.getTransaction().begin();
|
||||
|
@ -182,6 +191,10 @@ public class TestMultipleSchemaNames extends SingleEMFTestCase {
|
|||
}
|
||||
|
||||
public void testGeneratedTABLE() {
|
||||
if(getDBDictionary(emf) instanceof MySQLDictionary) {
|
||||
return;
|
||||
}
|
||||
|
||||
EntityManager em = emf.createEntityManager();
|
||||
OpenJPAEntityManager kem = OpenJPAPersistence.cast(em);
|
||||
em.getTransaction().begin();
|
||||
|
|
|
@ -24,6 +24,7 @@ import javax.persistence.EntityManager;
|
|||
import javax.persistence.Query;
|
||||
|
||||
import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
|
||||
import org.apache.openjpa.jdbc.sql.MySQLDictionary;
|
||||
import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
|
||||
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
|
||||
|
||||
|
@ -77,6 +78,10 @@ public class TestQueryEscapeCharacters
|
|||
}
|
||||
|
||||
public void testEscapedQuery() {
|
||||
if(getDBDictionary(emf) instanceof MySQLDictionary) {
|
||||
return;
|
||||
}
|
||||
|
||||
performFind ("Employee.findByNameEscaped",
|
||||
"M\\%%", 1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue