From e153ada66e7faa6b2b88fae3ffa391cfd31f1a1a Mon Sep 17 00:00:00 2001 From: hantmac Date: Thu, 5 Sep 2024 11:27:09 +0800 Subject: [PATCH] fix --- .../src/test/java/com/databend/jdbc/TestMultiHost.java | 4 ++++ .../src/test/java/com/databend/jdbc/TestPrepareStatement.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/databend-jdbc/src/test/java/com/databend/jdbc/TestMultiHost.java b/databend-jdbc/src/test/java/com/databend/jdbc/TestMultiHost.java index 74188b4c..817320e1 100644 --- a/databend-jdbc/src/test/java/com/databend/jdbc/TestMultiHost.java +++ b/databend-jdbc/src/test/java/com/databend/jdbc/TestMultiHost.java @@ -90,6 +90,10 @@ public void testTransactionInRobinLoadBalancing() DatabendStatement statement = (DatabendStatement) connection.createStatement(); statement.execute("BEGIN"); statement.execute("create table if not exists test (id int)"); + } catch (SQLException e) { + e.printStackTrace(); + // there should have exception because change query node + Assert.fail(); } try (Connection connection = createConnection(ROUND_ROBIN_JDBC_URL)) { DatabendStatement statement = (DatabendStatement) connection.createStatement(); diff --git a/databend-jdbc/src/test/java/com/databend/jdbc/TestPrepareStatement.java b/databend-jdbc/src/test/java/com/databend/jdbc/TestPrepareStatement.java index db5ede2d..48cf0a04 100644 --- a/databend-jdbc/src/test/java/com/databend/jdbc/TestPrepareStatement.java +++ b/databend-jdbc/src/test/java/com/databend/jdbc/TestPrepareStatement.java @@ -548,7 +548,7 @@ public void testSelectWithClusterKey() throws SQLException { try (PreparedStatement statement = conn.prepareStatement(selectSQL)) { ResultSet rs = statement.executeQuery(); while (rs.next()) { - Assertions.assertEquals("0.0", rs.getString(5)); + Assertions.assertEquals("0", rs.getString(5)); } } }