From dc2ff5833080d6a263bcecd126d10731a1e5302e Mon Sep 17 00:00:00 2001 From: zyyang Date: Wed, 24 Feb 2021 17:00:59 +0800 Subject: [PATCH] change --- .../com/taosdata/jdbc/TSDBPreparedStatementTest.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/TSDBPreparedStatementTest.java b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/TSDBPreparedStatementTest.java index 7d85c41ab4..170d63b94e 100644 --- a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/TSDBPreparedStatementTest.java +++ b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/TSDBPreparedStatementTest.java @@ -17,8 +17,10 @@ public class TSDBPreparedStatementTest { @Test public void executeQuery() throws SQLException { - pstmt_select.setString(1, "now - 1h"); - pstmt_select.setString(2, "now"); + long end = System.currentTimeMillis(); + long start = end - 1000 * 60 * 60; + pstmt_select.setTimestamp(1, new Timestamp(start)); + pstmt_select.setTimestamp(2, new Timestamp(endg)); pstmt_select.setFloat(3, 0); ResultSet rs = pstmt_select.executeQuery(); @@ -170,10 +172,10 @@ public class TSDBPreparedStatementTest { pstmt_insert.setURL(1, null); } - @Test + @Test(expected = SQLFeatureNotSupportedException.class) public void getParameterMetaData() throws SQLException { ParameterMetaData parameterMetaData = pstmt_insert.getParameterMetaData(); - Assert.assertNotNull(parameterMetaData); +// Assert.assertNotNull(parameterMetaData); //TODO: } -- GitLab