diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JavaTypesArrayTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JavaTypesArrayTest.java index ed2ce57f2..67637735d 100644 --- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JavaTypesArrayTest.java +++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JavaTypesArrayTest.java @@ -47,11 +47,10 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; /** - * Test that we handle arrays as basic types and the @{@link Array} annotation. + * Test that we handle arrays as basic types and the @{@link Array} annotation in combination with @{@link Column}. *
* Specifying the length doesn't seem to have any effect at the moment.
- * Except for Postgres: Hibernate ORM will use a different SQL query for the creation of the table, but Postgres will
- * ignore the limit anyway.
+ * We use it when creating the table with Postgres, but Postgres ignore it anyway.
*/
@Timeout(value = 10, timeUnit = MINUTES)
@DisabledFor(value = ORACLE, reason = "Vert.x does not support arrays for Oracle")
@@ -72,7 +71,7 @@ protected void addServices(StandardServiceRegistryBuilder builder) {
}
private static boolean filterCreateTable(String s) {
- return s.toLowerCase().startsWith( "create table basic" );
+ return s.toLowerCase().startsWith( "create table basic " );
}
@Override
@@ -387,7 +386,7 @@ public void testBigIntegerArrayType(VertxTestContext context) {
testField( context, basic, found -> {
assertArrayEquals( dataArray, found.bigIntegerArray );
- validateArrayColumn( "bigIntegerArray", null, null );
+ validateArrayColumn( "bigIntegerArray", null, 5000 );
} );
}
@@ -401,7 +400,7 @@ public void testBigDecimalArrayType(VertxTestContext context) {
assertEquals( dataArray.length, found.bigDecimalArray.length );
assertEquals( 0, dataArray[0].compareTo( found.bigDecimalArray[0] ) );
assertEquals( 0, dataArray[1].compareTo( found.bigDecimalArray[1] ) );
- validateArrayColumn( "bigDecimalArray", null, null );
+ validateArrayColumn( "bigDecimalArray", null, 5000 );
} );
}
@@ -415,6 +414,7 @@ public void testBigDecimalArrayTypeWithArrayAnnotation(VertxTestContext context)
assertEquals( dataArray.length, found.bigDecimalArrayWithArrayAnnotation.length );
assertEquals( 0, dataArray[0].compareTo( found.bigDecimalArrayWithArrayAnnotation[0] ) );
assertEquals( 0, dataArray[1].compareTo( found.bigDecimalArrayWithArrayAnnotation[1] ) );
+ validateArrayColumn( "bigDecimalArrayWithArrayAnnotation", 5, 5000 );
} );
}
@@ -426,32 +426,60 @@ private void validateArrayColumn(String columnName, Integer arrayLength, Integer
// A predicate that checks we apply the right size to the array when required
private static Predicate
+ * For example: {@code varchar(255) array[2]}
+ *