diff --git a/qa/sql/build.gradle b/qa/sql/build.gradle index 9f2db43f433..fdd1f86a148 100644 --- a/qa/sql/build.gradle +++ b/qa/sql/build.gradle @@ -90,7 +90,7 @@ subprojects { testRuntime("net.sourceforge.csvjdbc:csvjdbc:1.0.34") { transitive = false } - testRuntime("com.h2database:h2:1.4.194") { + testRuntime("com.h2database:h2:1.4.197") { transitive = false } diff --git a/qa/sql/src/main/java/org/elasticsearch/xpack/qa/sql/jdbc/JdbcAssert.java b/qa/sql/src/main/java/org/elasticsearch/xpack/qa/sql/jdbc/JdbcAssert.java index 3cfed3752e0..801f40639fa 100644 --- a/qa/sql/src/main/java/org/elasticsearch/xpack/qa/sql/jdbc/JdbcAssert.java +++ b/qa/sql/src/main/java/org/elasticsearch/xpack/qa/sql/jdbc/JdbcAssert.java @@ -132,7 +132,7 @@ public class JdbcAssert { } // then timestamp else if (type == Types.TIMESTAMP || type == Types.TIMESTAMP_WITH_TIMEZONE) { - assertEquals(msg, getTime(expected, column), getTime(actual, column)); + assertEquals(msg, expected.getTimestamp(column), actual.getTimestamp(column)); } // and floats/doubles else if (type == Types.DOUBLE) { @@ -161,7 +161,4 @@ public class JdbcAssert { } } - private static Object getTime(ResultSet rs, int column) throws SQLException { - return rs.getTime(column, UTC_CALENDAR).getTime(); - } } \ No newline at end of file diff --git a/qa/sql/src/main/java/org/elasticsearch/xpack/qa/sql/jdbc/LocalH2.java b/qa/sql/src/main/java/org/elasticsearch/xpack/qa/sql/jdbc/LocalH2.java index 796682976e7..89637c0d6eb 100644 --- a/qa/sql/src/main/java/org/elasticsearch/xpack/qa/sql/jdbc/LocalH2.java +++ b/qa/sql/src/main/java/org/elasticsearch/xpack/qa/sql/jdbc/LocalH2.java @@ -8,14 +8,11 @@ package org.elasticsearch.xpack.qa.sql.jdbc; import org.apache.logging.log4j.Logger; import org.elasticsearch.common.CheckedSupplier; import org.elasticsearch.common.logging.Loggers; -import org.elasticsearch.xpack.sql.client.shared.SuppressForbidden; import org.junit.rules.ExternalResource; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; -import java.util.Calendar; -import java.util.Locale; import java.util.Properties; public class LocalH2 extends ExternalResource implements CheckedSupplier { @@ -43,7 +40,6 @@ public class LocalH2 extends ExternalResource implements CheckedSupplier