提交 cf4ddbab authored 作者: Thomas Mueller's avatar Thomas Mueller

Make method static where possible.

上级 2dc4ed72
...@@ -51,7 +51,7 @@ public class TestWeb extends TestBase { ...@@ -51,7 +51,7 @@ public class TestWeb extends TestBase {
testWebApp(); testWebApp();
} }
private void testWrongParameters() throws Exception { private static void testWrongParameters() throws Exception {
new AssertThrows(ErrorCode.FEATURE_NOT_SUPPORTED_1) { new AssertThrows(ErrorCode.FEATURE_NOT_SUPPORTED_1) {
public void test() throws SQLException { public void test() throws SQLException {
Server.createPgServer("-pgPort 8182"); Server.createPgServer("-pgPort 8182");
......
...@@ -25,10 +25,10 @@ public class TestTempTableCrash { ...@@ -25,10 +25,10 @@ public class TestTempTableCrash {
* @param args ignored * @param args ignored
*/ */
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
new TestTempTableCrash().test(); TestTempTableCrash.test();
} }
private void test() throws Exception { private static void test() throws Exception {
Connection conn; Connection conn;
Statement stat; Statement stat;
......
...@@ -25,10 +25,10 @@ public class TestUndoLogLarge { ...@@ -25,10 +25,10 @@ public class TestUndoLogLarge {
*/ */
public static void main(String... args) throws Exception { public static void main(String... args) throws Exception {
// System.setProperty("h2.largeTransactions", "true"); // System.setProperty("h2.largeTransactions", "true");
new TestUndoLogLarge().test(); TestUndoLogLarge.test();
} }
private void test() throws SQLException { private static void test() throws SQLException {
DeleteDbFiles.execute("data", "test", true); DeleteDbFiles.execute("data", "test", true);
Connection conn = DriverManager.getConnection("jdbc:h2:data/test"); Connection conn = DriverManager.getConnection("jdbc:h2:data/test");
Statement stat = conn.createStatement(); Statement stat = conn.createStatement();
......
...@@ -24,13 +24,13 @@ public class TestUndoLogMemory { ...@@ -24,13 +24,13 @@ public class TestUndoLogMemory {
* @param args ignored * @param args ignored
*/ */
public static void main(String... args) throws Exception { public static void main(String... args) throws Exception {
new TestUndoLogMemory().test(10, "null"); TestUndoLogMemory.test(10, "null");
new TestUndoLogMemory().test(100, "space(100000)"); TestUndoLogMemory.test(100, "space(100000)");
// new TestUndoLogMemory().test(100000, "null"); // new TestUndoLogMemory().test(100000, "null");
// new TestUndoLogMemory().test(1000, "space(100000)"); // new TestUndoLogMemory().test(1000, "space(100000)");
} }
private void test(int count, String defaultValue) throws SQLException { private static void test(int count, String defaultValue) throws SQLException {
// -Xmx1m -XX:+HeapDumpOnOutOfMemoryError // -Xmx1m -XX:+HeapDumpOnOutOfMemoryError
DeleteDbFiles.execute("data", "test", true); DeleteDbFiles.execute("data", "test", true);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论