openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r526005 - in /incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc: TestIsolationLevelOverride.java TestSelectForUpdateOverride.java
Date Thu, 05 Apr 2007 23:57:44 GMT
Author: pcl
Date: Thu Apr  5 16:57:44 2007
New Revision: 526005

URL: http://svn.apache.org/viewvc?view=rev&rev=526005
Log:
HSQL doesn't support locking; short-circuiting tests that require pessimistic locking

Modified:
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestIsolationLevelOverride.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestSelectForUpdateOverride.java

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestIsolationLevelOverride.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestIsolationLevelOverride.java?view=diff&rev=526005&r1=526004&r2=526005
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestIsolationLevelOverride.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestIsolationLevelOverride.java
Thu Apr  5 16:57:44 2007
@@ -27,6 +27,7 @@
 import org.apache.openjpa.persistence.OpenJPAEntityManager;
 import org.apache.openjpa.jdbc.sql.DBDictionary;
 import org.apache.openjpa.jdbc.sql.DB2Dictionary;
+import org.apache.openjpa.jdbc.sql.HSQLDictionary;
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
 
 public class TestIsolationLevelOverride
@@ -43,6 +44,11 @@
             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();
         try {
             em.getTransaction().begin();

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestSelectForUpdateOverride.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestSelectForUpdateOverride.java?view=diff&rev=526005&r1=526004&r2=526005
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestSelectForUpdateOverride.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestSelectForUpdateOverride.java
Thu Apr  5 16:57:44 2007
@@ -22,6 +22,10 @@
 import org.apache.openjpa.persistence.simple.AllFieldTypes;
 import org.apache.openjpa.persistence.OpenJPAPersistence;
 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
     extends SQLListenerTestCase {
@@ -34,7 +38,15 @@
     }
 
     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();
         try {
             em.getTransaction().begin();



Mime
View raw message