mirror of https://github.com/apache/openjpa.git
HSQL doesn't support locking; short-circuiting tests that require pessimistic locking
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@526005 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7f998f10f1
commit
57442b7059
|
@ -27,6 +27,7 @@ import org.apache.openjpa.persistence.FetchPlan;
|
||||||
import org.apache.openjpa.persistence.OpenJPAEntityManager;
|
import org.apache.openjpa.persistence.OpenJPAEntityManager;
|
||||||
import org.apache.openjpa.jdbc.sql.DBDictionary;
|
import org.apache.openjpa.jdbc.sql.DBDictionary;
|
||||||
import org.apache.openjpa.jdbc.sql.DB2Dictionary;
|
import org.apache.openjpa.jdbc.sql.DB2Dictionary;
|
||||||
|
import org.apache.openjpa.jdbc.sql.HSQLDictionary;
|
||||||
import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
|
import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
|
||||||
|
|
||||||
public class TestIsolationLevelOverride
|
public class TestIsolationLevelOverride
|
||||||
|
@ -43,6 +44,11 @@ public class TestIsolationLevelOverride
|
||||||
OpenJPAPersistence.cast(emf.createEntityManager());
|
OpenJPAPersistence.cast(emf.createEntityManager());
|
||||||
DBDictionary dict = ((JDBCConfiguration) em.getConfiguration())
|
DBDictionary dict = ((JDBCConfiguration) em.getConfiguration())
|
||||||
.getDBDictionaryInstance();
|
.getDBDictionaryInstance();
|
||||||
|
|
||||||
|
// hsql doesn't support locking; circumvent the test
|
||||||
|
if (dict instanceof HSQLDictionary)
|
||||||
|
return;
|
||||||
|
|
||||||
sql.clear();
|
sql.clear();
|
||||||
try {
|
try {
|
||||||
em.getTransaction().begin();
|
em.getTransaction().begin();
|
||||||
|
|
|
@ -22,6 +22,10 @@ import org.apache.openjpa.persistence.test.SQLListenerTestCase;
|
||||||
import org.apache.openjpa.persistence.simple.AllFieldTypes;
|
import org.apache.openjpa.persistence.simple.AllFieldTypes;
|
||||||
import org.apache.openjpa.persistence.OpenJPAPersistence;
|
import org.apache.openjpa.persistence.OpenJPAPersistence;
|
||||||
import org.apache.openjpa.persistence.FetchPlan;
|
import org.apache.openjpa.persistence.FetchPlan;
|
||||||
|
import org.apache.openjpa.persistence.OpenJPAEntityManager;
|
||||||
|
import org.apache.openjpa.jdbc.sql.DBDictionary;
|
||||||
|
import org.apache.openjpa.jdbc.sql.HSQLDictionary;
|
||||||
|
import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
|
||||||
|
|
||||||
public class TestSelectForUpdateOverride
|
public class TestSelectForUpdateOverride
|
||||||
extends SQLListenerTestCase {
|
extends SQLListenerTestCase {
|
||||||
|
@ -34,7 +38,15 @@ public class TestSelectForUpdateOverride
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testSelectForUpdateOverride() {
|
public void testSelectForUpdateOverride() {
|
||||||
EntityManager em = emf.createEntityManager();
|
OpenJPAEntityManager em =
|
||||||
|
OpenJPAPersistence.cast(emf.createEntityManager());
|
||||||
|
DBDictionary dict = ((JDBCConfiguration) em.getConfiguration())
|
||||||
|
.getDBDictionaryInstance();
|
||||||
|
|
||||||
|
// hsql doesn't support locking; circumvent the test
|
||||||
|
if (dict instanceof HSQLDictionary)
|
||||||
|
return;
|
||||||
|
|
||||||
sql.clear();
|
sql.clear();
|
||||||
try {
|
try {
|
||||||
em.getTransaction().begin();
|
em.getTransaction().begin();
|
||||||
|
|
Loading…
Reference in New Issue