Skip to content

Commit

Permalink
[hibernate#1550] Disable BasicTypesAndCallbacksForAllDBsTest for Db2
Browse files Browse the repository at this point in the history
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 eclipse-vertx/vertx-sql-client#1304
  • Loading branch information
DavideD committed Apr 4, 2023
1 parent b1b88d1 commit 066eeb3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@
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;
import static org.hibernate.reactive.testing.DatabaseSelectionRule.skipTestsFor;

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<Class<?>> annotatedEntities() {
return Set.of( Basic.class );
Expand Down

0 comments on commit 066eeb3

Please sign in to comment.