提交 8dbc26d5 authored 作者: noelgrandin's avatar noelgrandin

remove runFinalize system property, has been dead code for a while

上级 e9383644
...@@ -287,12 +287,6 @@ public class SysProperties { ...@@ -287,12 +287,6 @@ public class SysProperties {
*/ */
public static final String PREFIX_TEMP_FILE = Utils.getProperty("h2.prefixTempFile", "h2.temp"); public static final String PREFIX_TEMP_FILE = Utils.getProperty("h2.prefixTempFile", "h2.temp");
/**
* System property <code>h2.runFinalize</code> (default: true).<br />
* Run finalizers to detect unclosed connections.
*/
public static boolean runFinalize = Utils.getProperty("h2.runFinalize", true);
/** /**
* System property <code>h2.serverCachedObjects</code> (default: 64).<br /> * System property <code>h2.serverCachedObjects</code> (default: 64).<br />
* TCP Server: number of cached objects per session. * TCP Server: number of cached objects per session.
......
...@@ -141,7 +141,6 @@ public class TestPowerOff extends TestBase { ...@@ -141,7 +141,6 @@ public class TestPowerOff extends TestBase {
} }
deleteDb(dir, DB_NAME); deleteDb(dir, DB_NAME);
Random random = new Random(1); Random random = new Random(1);
SysProperties.runFinalize = false;
int repeat = getSize(1, 20); int repeat = getSize(1, 20);
for (int i = 0; i < repeat; i++) { for (int i = 0; i < repeat; i++) {
Connection conn = getConnection(url); Connection conn = getConnection(url);
...@@ -173,7 +172,6 @@ public class TestPowerOff extends TestBase { ...@@ -173,7 +172,6 @@ public class TestPowerOff extends TestBase {
} }
} }
} }
SysProperties.runFinalize = true;
} }
private void testShutdown() throws SQLException { private void testShutdown() throws SQLException {
......
...@@ -61,7 +61,6 @@ public class TestManyJdbcObjects extends TestBase { ...@@ -61,7 +61,6 @@ public class TestManyJdbcObjects extends TestBase {
// SERVER_CACHED_OBJECTS = 500: connections = 40 // SERVER_CACHED_OBJECTS = 500: connections = 40
// SERVER_CACHED_OBJECTS = 50: connections = 120 // SERVER_CACHED_OBJECTS = 50: connections = 120
deleteDb("manyObjects"); deleteDb("manyObjects");
SysProperties.runFinalize = false;
int connCount = getSize(4, 40); int connCount = getSize(4, 40);
Connection[] conn = new Connection[connCount]; Connection[] conn = new Connection[connCount];
for (int i = 0; i < connCount; i++) { for (int i = 0; i < connCount; i++) {
...@@ -79,12 +78,10 @@ public class TestManyJdbcObjects extends TestBase { ...@@ -79,12 +78,10 @@ public class TestManyJdbcObjects extends TestBase {
for (int i = 0; i < connCount; i++) { for (int i = 0; i < connCount; i++) {
conn[i].close(); conn[i].close();
} }
SysProperties.runFinalize = true;
} }
private void testOneConnectionPrepare() throws SQLException { private void testOneConnectionPrepare() throws SQLException {
deleteDb("manyObjects"); deleteDb("manyObjects");
SysProperties.runFinalize = false;
Connection conn = getConnection("manyObjects"); Connection conn = getConnection("manyObjects");
PreparedStatement prep; PreparedStatement prep;
Statement stat; Statement stat;
...@@ -115,7 +112,6 @@ public class TestManyJdbcObjects extends TestBase { ...@@ -115,7 +112,6 @@ public class TestManyJdbcObjects extends TestBase {
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
prep.executeQuery(); prep.executeQuery();
} }
SysProperties.runFinalize = true;
conn.close(); conn.close();
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论