From 5615ddee5fc5ab083ba9cf6aab40e19842a355d9 Mon Sep 17 00:00:00 2001 From: Sebastian Utz Date: Thu, 19 Sep 2024 09:55:13 +0200 Subject: [PATCH] Fix types tests, adjust long value range Relates to https://github.com/crate/crate/pull/16629. --- .../io/crate/client/jdbc/integrationtests/TypesITest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driver/test/java/io/crate/client/jdbc/integrationtests/TypesITest.java b/driver/test/java/io/crate/client/jdbc/integrationtests/TypesITest.java index 9f5bb703..3905cc68 100644 --- a/driver/test/java/io/crate/client/jdbc/integrationtests/TypesITest.java +++ b/driver/test/java/io/crate/client/jdbc/integrationtests/TypesITest.java @@ -80,7 +80,7 @@ private static void insertIntoArrayTable() throws SQLException { preparedStatement.setArray(4, CONNECTION.createArrayOf("byte", new Byte[]{new Byte("120"), new Byte("100")})); preparedStatement.setArray(5, CONNECTION.createArrayOf("short", new Short[]{1300, 1200})); preparedStatement.setArray(6, CONNECTION.createArrayOf("integer", new Integer[]{2147483647, 234583})); - preparedStatement.setArray(7, CONNECTION.createArrayOf("long", new Long[]{9223372036854775807L, 4L})); + preparedStatement.setArray(7, CONNECTION.createArrayOf("long", new Long[]{9223372036854775806L, 4L})); preparedStatement.setArray(8, CONNECTION.createArrayOf("float", new Float[]{3.402f, 3.403f, 1.4f})); preparedStatement.setArray(9, CONNECTION.createArrayOf("double", new Double[]{1.79769313486231570e+308, 1.69769313486231570e+308})); preparedStatement.setArray(10, CONNECTION.createArrayOf("timestamp", new Timestamp[]{new Timestamp(1000L), new Timestamp(2000L)})); @@ -292,7 +292,7 @@ public void testSelectLongArrayType() throws Exception { Array longArray = resultSet.getArray("long_array"); assertThat(longArray.getArray().getClass().isArray(), is(true)); assertThat(longArray.getBaseType(), is(Types.BIGINT)); - assertThat((Object[]) longArray.getArray(), Matchers.arrayContaining(9223372036854775807L, 4L)); + assertThat((Object[]) longArray.getArray(), Matchers.arrayContaining(9223372036854775806L, 4L)); } @Test