openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allee8...@apache.org
Subject svn commit: r1510667 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/strategy/TestHandlerStrategy.java
Date Mon, 05 Aug 2013 19:15:52 GMT
Author: allee8285
Date: Mon Aug  5 19:15:52 2013
New Revision: 1510667

URL: http://svn.apache.org/r1510667
Log:
OPENJPA-2378 - Fix test case to run test only if supportsAutoAssign is enabled. Contributed
by Di Lau

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/strategy/TestHandlerStrategy.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/strategy/TestHandlerStrategy.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/strategy/TestHandlerStrategy.java?rev=1510667&r1=1510666&r2=1510667&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/strategy/TestHandlerStrategy.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/strategy/TestHandlerStrategy.java
Mon Aug  5 19:15:52 2013
@@ -17,6 +17,7 @@ package org.apache.openjpa.persistence.j
 
 import javax.persistence.EntityManager;
 
+import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
 import org.apache.openjpa.persistence.jdbc.strategy.MappedEntity.Key;
 import org.apache.openjpa.persistence.test.SingleEMFTestCase;
 
@@ -34,6 +35,10 @@ public class TestHandlerStrategy extends
      * @see JIRA ticket OPENJPA-2328 for more explanation
      */
     public void testIssue_OPENJPA2328() {
+        // Not all databases support GenerationType.IDENTITY column(s)
+        if (!((JDBCConfiguration) emf.getConfiguration()).getDBDictionaryInstance().supportsAutoAssign)
{
+            return;
+        }
         EntityManager em = emf.createEntityManager();
         MapperEntity ae = new MapperEntity();
         for (Key key : Key.values()) {



Mime
View raw message