提交 2c045835 authored 作者: Noel Grandin's avatar Noel Grandin

some tests were not closing their connections

上级 e96c3246
......@@ -41,6 +41,7 @@ public class TestRowFactory extends TestBase {
stat.execute("insert into t1 values(" + i + ", 'name')");
}
assertTrue(MyTestRowFactory.COUNTER.get() >= 1000);
conn.close();
deleteDb("rowFactory");
}
......
......@@ -345,7 +345,7 @@ public class TestTableEngines extends TestBase {
return "0".equals(b) && a != null && a < 2;
}
}, null);
conn.close();
deleteDb("tableEngine");
}
......@@ -362,6 +362,7 @@ public class TestTableEngines extends TestBase {
+ "(select id from QUERY_EXPR_TEST)");
stat.executeQuery("select 1 from QUERY_EXPR_TEST_NO n "
+ "where exists(select 1 from QUERY_EXPR_TEST y where y.id = n.id)");
conn.close();
deleteDb("testQueryExpressionFlag");
}
......@@ -401,6 +402,7 @@ public class TestTableEngines extends TestBase {
checkPlan(stat, "select * from (select (select id from test_plan "
+ "where name = 'z') from dual)",
"MY_NAME_INDEX");
conn.close();
deleteDb("testSubQueryInfo");
}
......@@ -469,6 +471,7 @@ public class TestTableEngines extends TestBase {
forceJoinOrder(stat, false);
TreeSetIndex.exec.shutdownNow();
}
conn.close();
deleteDb("testBatchedJoin");
}
......
......@@ -187,6 +187,7 @@ public class TestDataSource extends TestBase {
conn = ds.getConnection(getUser(), getPassword());
stat = conn.createStatement();
stat.execute("SELECT * FROM DUAL");
conn.close();
}
}
......@@ -10,7 +10,6 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.concurrent.atomic.AtomicBoolean;
import org.h2.api.ErrorCode;
import org.h2.test.TestBase;
import org.h2.util.Task;
......@@ -151,6 +150,7 @@ public class TestMvcc2 extends TestBase {
assertThrows(ErrorCode.LOCK_TIMEOUT_1, conn2.createStatement()).
execute("select * from test where id = 3 for update");
conn.close();
conn2.close();
}
private void testInsertUpdateRollback() throws SQLException {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论