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 ab7cf6c8c07b316f13c3d0b051928fd4c313fe1e..3ad51479d6dece8d4d717a3609615b9ba2f93349 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 @@ -295,6 +295,14 @@ public class TSDBPreparedStatementTest { assertAllNullExceptTimestamp(rs, ts); } } + + @Test + public void createTwoSameDbTest() throws SQLException { + Statement stmt = conn.createStatement(); + + stmt.execute("create database dbtest"); + Assert.assertThrows(SQLException.class, () -> stmt.execute("create database dbtest")); + } @Test public void setBoolean() throws SQLException {