openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fayw...@apache.org
Subject svn commit: r965899 - in /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence: generationtype/TestGeneratedValues.java jdbc/annotations/TestNonstandardMappingAnnotations.java
Date Tue, 20 Jul 2010 16:43:31 GMT
Author: faywang
Date: Tue Jul 20 16:43:30 2010
New Revision: 965899

URL: http://svn.apache.org/viewvc?rev=965899&view=rev
Log:
OPENJPA-1726: exclude Postgres from the test case due to the problem of storing the randomly
generated UUID String to the UTF-8 database. 

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGeneratedValues.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestNonstandardMappingAnnotations.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGeneratedValues.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGeneratedValues.java?rev=965899&r1=965898&r2=965899&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGeneratedValues.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGeneratedValues.java
Tue Jul 20 16:43:30 2010
@@ -18,19 +18,27 @@
  */
 package org.apache.openjpa.persistence.generationtype;
 
-import javax.persistence.EntityManager;
 import javax.persistence.EntityExistsException;
+import javax.persistence.EntityManager;
 
+import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
+import org.apache.openjpa.jdbc.sql.DBDictionary;
+import org.apache.openjpa.jdbc.sql.PostgresDictionary;
 import org.apache.openjpa.persistence.InvalidStateException;
 import org.apache.openjpa.persistence.test.SingleEMFTestCase;
 
 public class TestGeneratedValues extends SingleEMFTestCase {
+    DBDictionary _dict;
     
     public void setUp() { 
         setUp(GeneratedValues.class, CLEAR_TABLES);
+        _dict = ((JDBCConfiguration)emf.getConfiguration()).getDBDictionaryInstance();
     }
 
-    public void testDefaultValues() { 
+    public void testDefaultValues() {
+        if (_dict instanceof PostgresDictionary) 
+            return;
+        
         EntityManager em = emf.createEntityManager();
 
         GeneratedValues gv = new GeneratedValues();
@@ -135,6 +143,8 @@ public class TestGeneratedValues extends
 //    }
 
     public void testCustomSequenceGeneratorWithIndirection() {
+        if (_dict instanceof PostgresDictionary) 
+            return;
         EntityManager em = emf.createEntityManager();
 
         GeneratedValues gv = new GeneratedValues();
@@ -147,6 +157,9 @@ public class TestGeneratedValues extends
     }
     
     public void testUUIDGenerators() {
+        if (_dict instanceof PostgresDictionary) 
+            return;
+        
         EntityManager em = emf.createEntityManager();
 
         GeneratedValues gv = new GeneratedValues();

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestNonstandardMappingAnnotations.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestNonstandardMappingAnnotations.java?rev=965899&r1=965898&r2=965899&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestNonstandardMappingAnnotations.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestNonstandardMappingAnnotations.java
Tue Jul 20 16:43:30 2010
@@ -31,6 +31,7 @@ import org.apache.openjpa.jdbc.meta.Valu
 import org.apache.openjpa.jdbc.meta.strats.ClassNameDiscriminatorStrategy;
 import org.apache.openjpa.jdbc.schema.ForeignKey;
 import org.apache.openjpa.jdbc.sql.DBDictionary;
+import org.apache.openjpa.jdbc.sql.PostgresDictionary;
 import org.apache.openjpa.persistence.JPAFacadeHelper;
 import org.apache.openjpa.persistence.OpenJPAEntityManager;
 import org.apache.openjpa.persistence.test.SingleEMFTestCase;
@@ -211,6 +212,9 @@ public class TestNonstandardMappingAnnot
     }
 
     public void testInsertAndRetrieve() {
+        if (_dict instanceof PostgresDictionary) 
+            return;
+        
         NonstandardMappingEntity pc = new NonstandardMappingEntity();
         pc.getSuperCollection().add("super");
         pc.setCustom(new Point(1, 2));



Mime
View raw message