Skip to content

Commit 4d8db6c

Browse files
committed
Fix ColumnTypesMappingTest
Add expected type for the native query result, or Blob will be used for MySQL (causing tests to fail).
1 parent 73d61b1 commit 4d8db6c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/ColumnTypesMappingTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
import io.vertx.ext.unit.TestContext;
3333

34+
import static org.assertj.core.api.Assertions.assertThat;
3435
import static org.hibernate.reactive.containers.DatabaseConfiguration.expectedDatatype;
3536
import static org.hibernate.reactive.containers.DatabaseConfiguration.getDatatypeQuery;
3637

@@ -47,10 +48,9 @@ protected Collection<Class<?>> annotatedEntities() {
4748
private void testDatatype(TestContext context, String columnName, Class<?> type) {
4849
test( context, openSession()
4950
.thenCompose( s -> s
50-
.createNativeQuery( getDatatypeQuery( BasicTypesTestEntity.TABLE_NAME, columnName ) )
51+
.createNativeQuery( getDatatypeQuery( BasicTypesTestEntity.TABLE_NAME, columnName ), String.class )
5152
.getSingleResult()
52-
.thenAccept( result -> context.assertEquals( expectedDatatype( type ), toString( result ) ) )
53-
)
53+
.thenAccept( typeOnTheDb -> assertThat( toString( typeOnTheDb ) ).isEqualTo( expectedDatatype( type ) ) ) )
5454
);
5555
}
5656

0 commit comments

Comments
 (0)