OPENJPA-1726: exclude Postgres from the test case due to the problem of storing the randomly generated UUID String to the UTF-8 database.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@965899 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Fay Wang 2010-07-20 16:43:30 +00:00
parent c3a7417e24
commit 9166a7753a
2 changed files with 19 additions and 2 deletions

View File

@ -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() {
if (_dict instanceof PostgresDictionary)
return;
EntityManager em = emf.createEntityManager();
GeneratedValues gv = new GeneratedValues();
@ -135,6 +143,8 @@ public class TestGeneratedValues extends SingleEMFTestCase {
// }
public void testCustomSequenceGeneratorWithIndirection() {
if (_dict instanceof PostgresDictionary)
return;
EntityManager em = emf.createEntityManager();
GeneratedValues gv = new GeneratedValues();
@ -147,6 +157,9 @@ public class TestGeneratedValues extends SingleEMFTestCase {
}
public void testUUIDGenerators() {
if (_dict instanceof PostgresDictionary)
return;
EntityManager em = emf.createEntityManager();
GeneratedValues gv = new GeneratedValues();

View File

@ -31,6 +31,7 @@ import org.apache.openjpa.jdbc.meta.ValueMapping;
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 TestNonstandardMappingAnnotations
}
public void testInsertAndRetrieve() {
if (_dict instanceof PostgresDictionary)
return;
NonstandardMappingEntity pc = new NonstandardMappingEntity();
pc.getSuperCollection().add("super");
pc.setCustom(new Point(1, 2));