From ce9345266c2e3222b8fb7731a17db6209ee80899 Mon Sep 17 00:00:00 2001 From: Davide D'Alto Date: Tue, 4 Apr 2023 12:32:18 +0200 Subject: [PATCH] [#1550] Disable BasicTypesAndCallbacksForAllDBsTest for Db2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tests throw exception: ``` Parameter at position[0] with class = [io.vertx.core.buffer.impl.BufferImpl] and value = [>Eg�BӤVUfBD] can not be coerced to the expected class = [io.netty.buffer.ByteBuf] for encoding. ``` See https://github.com/eclipse-vertx/vertx-sql-client/issues/1304 --- .../java/org/hibernate/reactive/UUIDAsBinaryType.java | 5 +++++ .../types/BasicTypesAndCallbacksForAllDBsTest.java | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/UUIDAsBinaryType.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/UUIDAsBinaryType.java index b6e735651c..4ac853b74e 100644 --- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/UUIDAsBinaryType.java +++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/UUIDAsBinaryType.java @@ -22,6 +22,7 @@ import io.vertx.ext.unit.TestContext; import static java.util.Arrays.asList; +import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2; import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.MARIA; import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.MYSQL; import static org.hibernate.reactive.testing.DatabaseSelectionRule.runOnlyFor; @@ -29,6 +30,10 @@ public abstract class UUIDAsBinaryType extends BaseReactiveTest { + //Db2: testUUIDType throws NoStackTraceThrowable: parameter of type BufferImpl cannot be coerced to ByteBuf + @Rule + public final DatabaseSelectionRule skip = DatabaseSelectionRule.skipTestsFor( DB2 ); + public static class ForMySQLandMariaDBTest extends UUIDAsBinaryType { // There's an issue querying for Binary types if the size of the column is different from // the size of the parameter: see https://github.com/hibernate/hibernate-reactive/issues/678 diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/BasicTypesAndCallbacksForAllDBsTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/BasicTypesAndCallbacksForAllDBsTest.java index 6afb5c6158..f4d20bb675 100644 --- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/BasicTypesAndCallbacksForAllDBsTest.java +++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/BasicTypesAndCallbacksForAllDBsTest.java @@ -29,8 +29,10 @@ import org.hibernate.annotations.Type; import org.hibernate.reactive.BaseReactiveTest; +import org.hibernate.reactive.testing.DatabaseSelectionRule; import org.junit.Ignore; +import org.junit.Rule; import org.junit.Test; import io.vertx.ext.unit.TestContext; @@ -59,11 +61,17 @@ import jakarta.persistence.Transient; import jakarta.persistence.Version; +import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.*; + /** * Test all the types and lifecycle callbacks that we expect to work on all supported DBs */ public class BasicTypesAndCallbacksForAllDBsTest extends BaseReactiveTest { + //Db2: testUUIDType throws NoStackTraceThrowable: parameter of type BufferImpl cannot be coerced to ByteBuf + @Rule + public final DatabaseSelectionRule skip = DatabaseSelectionRule.skipTestsFor( DB2 ); + @Override protected Set> annotatedEntities() { return Set.of( Basic.class );