This is an automated email from the ASF dual-hosted git repository.

rong pushed a commit to branch iotdb-1620
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 41ba5403bacd674873bf7a9b2a0442c4efe57f13
Author: Steve Yurong Su <[email protected]>
AuthorDate: Thu Oct 7 16:52:53 2021 +0800

    fix connection leak in IoTDBArithmeticIT
---
 .../java/org/apache/iotdb/db/integration/IoTDBArithmeticIT.java    | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/server/src/test/java/org/apache/iotdb/db/integration/IoTDBArithmeticIT.java 
b/server/src/test/java/org/apache/iotdb/db/integration/IoTDBArithmeticIT.java
index 741cef1..331aa76 100644
--- 
a/server/src/test/java/org/apache/iotdb/db/integration/IoTDBArithmeticIT.java
+++ 
b/server/src/test/java/org/apache/iotdb/db/integration/IoTDBArithmeticIT.java
@@ -137,9 +137,10 @@ public class IoTDBArithmeticIT {
 
   @Test
   public void testArithmeticBinary() {
-    try (Statement statement =
-        DriverManager.getConnection(Config.IOTDB_URL_PREFIX + 
"127.0.0.1:6667/", "root", "root")
-            .createStatement()) {
+    try (Connection connection =
+            DriverManager.getConnection(
+                Config.IOTDB_URL_PREFIX + "127.0.0.1:6667/", "root", "root");
+        Statement statement = connection.createStatement()) {
 
       String[] operands = new String[] {"s1", "s2", "s3", "s4"};
       for (String operator : new String[] {" + ", " - ", " * ", " / ", " % "}) 
{

Reply via email to