From e15cf1ace654c87620ebd53a4cc0fd8795673d9d Mon Sep 17 00:00:00 2001 From: Jan Martiska Date: Mon, 12 Dec 2016 13:36:55 +0100 Subject: [PATCH] HHH-11332 skip some tests from QueryAndSQLTest and QueryTest on Sybase --- .../java/org/hibernate/jpa/test/query/QueryTest.java | 11 +++++++++++ .../test/annotations/query/QueryAndSQLTest.java | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/hibernate-core/src/test/java/org/hibernate/jpa/test/query/QueryTest.java b/hibernate-core/src/test/java/org/hibernate/jpa/test/query/QueryTest.java index be8fdcb441ef..28557027096b 100644 --- a/hibernate-core/src/test/java/org/hibernate/jpa/test/query/QueryTest.java +++ b/hibernate-core/src/test/java/org/hibernate/jpa/test/query/QueryTest.java @@ -27,6 +27,7 @@ import org.hibernate.dialect.Oracle8iDialect; import org.hibernate.dialect.PostgreSQL9Dialect; import org.hibernate.dialect.PostgresPlusDialect; +import org.hibernate.dialect.SybaseDialect; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase; import org.hibernate.jpa.test.Distributor; @@ -131,6 +132,7 @@ public void testPagedQuery() throws Exception { } @Test + @SkipForDialect(value = SybaseDialect.class, comment = "Null == null on Sybase") public void testNullPositionalParameter() throws Exception { EntityManager em = getOrCreateEntityManager(); em.getTransaction().begin(); @@ -160,6 +162,7 @@ public void testNullPositionalParameter() throws Exception { } @Test + @SkipForDialect(value = SybaseDialect.class, comment = "Null == null on Sybase") public void testNullPositionalParameterParameter() throws Exception { EntityManager em = getOrCreateEntityManager(); em.getTransaction().begin(); @@ -206,6 +209,7 @@ public Class getParameterType() { } @Test + @SkipForDialect(value = SybaseDialect.class, comment = "Null == null on Sybase") public void testNullPositionalParameterParameterIncompatible() throws Exception { EntityManager em = getOrCreateEntityManager(); em.getTransaction().begin(); @@ -252,6 +256,7 @@ public Class getParameterType() { } @Test + @SkipForDialect(value = SybaseDialect.class, comment = "Null == null on Sybase") public void testNullNamedParameter() throws Exception { EntityManager em = getOrCreateEntityManager(); em.getTransaction().begin(); @@ -281,6 +286,7 @@ public void testNullNamedParameter() throws Exception { } @Test + @SkipForDialect(value = SybaseDialect.class, comment = "Null == null on Sybase") public void testNullNamedParameterParameter() throws Exception { EntityManager em = getOrCreateEntityManager(); em.getTransaction().begin(); @@ -326,6 +332,7 @@ public Class getParameterType() { } @Test + @SkipForDialect(value = SybaseDialect.class, comment = "Null == null on Sybase") public void testNullNamedParameterParameterIncompatible() throws Exception { EntityManager em = getOrCreateEntityManager(); em.getTransaction().begin(); @@ -374,6 +381,7 @@ public Class getParameterType() { @SkipForDialect(value = Oracle8iDialect.class, jiraKey = "HHH-10161", comment = "Cannot convert untyped null (assumed to be BINARY type) to NUMBER") @SkipForDialect(value = PostgreSQL9Dialect.class, jiraKey = "HHH-10312", comment = "Cannot convert untyped null (assumed to be bytea type) to bigint") @SkipForDialect(value = PostgresPlusDialect.class, jiraKey = "HHH-10312", comment = "Cannot convert untyped null (assumed to be bytea type) to bigint") + @SkipForDialect(value = SybaseDialect.class, comment = "Null == null on Sybase") public void testNativeQueryNullPositionalParameter() throws Exception { EntityManager em = getOrCreateEntityManager(); em.getTransaction().begin(); @@ -409,6 +417,7 @@ public void testNativeQueryNullPositionalParameter() throws Exception { @SkipForDialect(value = PostgreSQL9Dialect.class, jiraKey = "HHH-10312", comment = "Cannot convert untyped null (assumed to be bytea type) to bigint") @SkipForDialect(value = PostgresPlusDialect.class, jiraKey = "HHH-10312", comment = "Cannot convert untyped null (assumed to be bytea type) to bigint") @SkipForDialect(value = Oracle8iDialect.class, comment = "ORA-00932: inconsistent datatypes: expected NUMBER got BINARY") + @SkipForDialect(value = SybaseDialect.class, comment = "Null == null on Sybase") public void testNativeQueryNullPositionalParameterParameter() throws Exception { EntityManager em = getOrCreateEntityManager(); em.getTransaction().begin(); @@ -460,6 +469,7 @@ public Class getParameterType() { @SkipForDialect(value = Oracle8iDialect.class, jiraKey = "HHH-10161", comment = "Cannot convert untyped null (assumed to be BINARY type) to NUMBER") @SkipForDialect(value = PostgreSQL9Dialect.class, jiraKey = "HHH-10312", comment = "Cannot convert untyped null (assumed to be bytea type) to bigint") @SkipForDialect(value = PostgresPlusDialect.class, jiraKey = "HHH-10312", comment = "Cannot convert untyped null (assumed to be bytea type) to bigint") + @SkipForDialect(value = SybaseDialect.class, comment = "Null == null on Sybase") public void testNativeQueryNullNamedParameter() throws Exception { EntityManager em = getOrCreateEntityManager(); em.getTransaction().begin(); @@ -495,6 +505,7 @@ public void testNativeQueryNullNamedParameter() throws Exception { @SkipForDialect(value = PostgreSQL9Dialect.class, jiraKey = "HHH-10312", comment = "Cannot convert untyped null (assumed to be bytea type) to bigint") @SkipForDialect(value = PostgresPlusDialect.class, jiraKey = "HHH-10312", comment = "Cannot convert untyped null (assumed to be bytea type) to bigint") @SkipForDialect(value = Oracle8iDialect.class, comment = "ORA-00932: inconsistent datatypes: expected NUMBER got BINARY") + @SkipForDialect(value = SybaseDialect.class, comment = "Null == null on Sybase") public void testNativeQueryNullNamedParameterParameter() throws Exception { EntityManager em = getOrCreateEntityManager(); em.getTransaction().begin(); diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/query/QueryAndSQLTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/query/QueryAndSQLTest.java index f5972783873c..621eb48d5efe 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/query/QueryAndSQLTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/query/QueryAndSQLTest.java @@ -27,6 +27,7 @@ import org.hibernate.dialect.PostgreSQL9Dialect; import org.hibernate.dialect.PostgreSQLDialect; import org.hibernate.dialect.PostgresPlusDialect; +import org.hibernate.dialect.SybaseDialect; import org.hibernate.dialect.function.SQLFunction; import org.hibernate.stat.Statistics; import org.hibernate.type.StandardBasicTypes; @@ -109,6 +110,7 @@ public void testNativeQueryWithFormulaAttributeWithoutAlias() { @SkipForDialect(value = Oracle8iDialect.class, jiraKey = "HHH-10161", comment = "Cannot convert untyped null (assumed to be BINARY type) to NUMBER") @SkipForDialect(value = PostgreSQL9Dialect.class, jiraKey = "HHH-10312", comment = "Cannot convert untyped null (assumed to be bytea type) to bigint") @SkipForDialect(value = PostgresPlusDialect.class, jiraKey = "HHH-10312", comment = "Cannot convert untyped null (assumed to be bytea type) to bigint") + @SkipForDialect(value = SybaseDialect.class, comment = "Null == null on Sybase") public void testQueryWithNullParameter(){ Chaos c0 = new Chaos(); c0.setId( 0L ); @@ -149,6 +151,7 @@ public void testQueryWithNullParameter(){ @Test @TestForIssue( jiraKey = "HHH-10161") + @SkipForDialect(value = SybaseDialect.class, comment = "Null == null on Sybase") public void testQueryWithNullParameterTyped(){ Chaos c0 = new Chaos(); c0.setId( 0L ); @@ -192,6 +195,7 @@ public void testQueryWithNullParameterTyped(){ @SkipForDialect(value = Oracle8iDialect.class, jiraKey = "HHH-10161", comment = "Cannot convert untyped null (assumed to be BINARY type) to NUMBER") @SkipForDialect(value = PostgreSQL9Dialect.class, jiraKey = "HHH-10312", comment = "Cannot convert untyped null (assumed to be bytea type) to bigint") @SkipForDialect(value = PostgresPlusDialect.class, jiraKey = "HHH-10312", comment = "Cannot convert untyped null (assumed to be bytea type) to bigint") + @SkipForDialect(value = SybaseDialect.class, comment = "Null == null on Sybase") public void testNativeQueryWithNullParameter(){ Chaos c0 = new Chaos(); c0.setId( 0L ); @@ -232,6 +236,7 @@ public void testNativeQueryWithNullParameter(){ @Test @TestForIssue( jiraKey = "HHH-10161") + @SkipForDialect(value = SybaseDialect.class, comment = "Null == null on Sybase") public void testNativeQueryWithNullParameterTyped(){ Chaos c0 = new Chaos(); c0.setId( 0L );