ruanwenjun commented on code in PR #7134:
URL: https://github.com/apache/kyuubi/pull/7134#discussion_r2204114650


##########
kyuubi-hive-jdbc/src/test/java/org/apache/kyuubi/jdbc/hive/KyuubiStatementTest.java:
##########
@@ -54,4 +58,29 @@ public void testaddBatch() throws SQLException {
       stmt.addBatch(null);
     }
   }
+
+  @Test
+  public void testThrowKyuubiSQLExceptionWhenExecuteSqlOnClosedStmt() throws 
SQLException {
+    KyuubiStatement stmt = new KyuubiStatement(null, null, null);
+    try {
+      ExecutorService executorService = Executors.newFixedThreadPool(2);

Review Comment:
   Done



##########
kyuubi-hive-jdbc/src/test/java/org/apache/kyuubi/jdbc/hive/KyuubiStatementTest.java:
##########
@@ -54,4 +58,29 @@ public void testaddBatch() throws SQLException {
       stmt.addBatch(null);
     }
   }
+
+  @Test
+  public void testThrowKyuubiSQLExceptionWhenExecuteSqlOnClosedStmt() throws 
SQLException {
+    KyuubiStatement stmt = new KyuubiStatement(null, null, null);
+    try {
+      ExecutorService executorService = Executors.newFixedThreadPool(2);
+      executorService.submit(
+          () -> {
+            try {
+              stmt.close();
+            } catch (SQLException e) {
+              throw new RuntimeException(e);
+            }
+          });
+      executorService.submit(
+          () -> {
+            Assert.assertEquals(
+                "Can't exectue after statement has been closed",

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org
For additional commands, e-mail: notifications-h...@kyuubi.apache.org

Reply via email to