提交 5b9f886c authored 作者: Thomas Mueller's avatar Thomas Mueller

Cleanup.

上级 42d37ddf
...@@ -18,7 +18,7 @@ import org.h2.util.Task; ...@@ -18,7 +18,7 @@ import org.h2.util.Task;
*/ */
public class TestMultiConn extends TestBase { public class TestMultiConn extends TestBase {
private static int wait; static int wait;
/** /**
* Run just this test. * Run just this test.
...@@ -199,6 +199,9 @@ public class TestMultiConn extends TestBase { ...@@ -199,6 +199,9 @@ public class TestMultiConn extends TestBase {
} }
/**
* A database event listener used in this test.
*/
public static final class MyDatabaseEventListener implements DatabaseEventListener { public static final class MyDatabaseEventListener implements DatabaseEventListener {
@Override @Override
......
...@@ -201,6 +201,9 @@ public class TestOpenClose extends TestBase { ...@@ -201,6 +201,9 @@ public class TestOpenClose extends TestBase {
return nextId++; return nextId++;
} }
/**
* A database event listener used in this test.
*/
public static final class MyDatabaseEventListener implements DatabaseEventListener { public static final class MyDatabaseEventListener implements DatabaseEventListener {
@Override @Override
......
...@@ -76,15 +76,15 @@ public class TestTableEngines extends TestBase { ...@@ -76,15 +76,15 @@ public class TestTableEngines extends TestBase {
deleteDb("tableEngine"); deleteDb("tableEngine");
Connection conn = getConnection("tableEngine"); Connection conn = getConnection("tableEngine");
Statement stat = conn.createStatement(); Statement stat = conn.createStatement();
stat.execute("CREATE TABLE t1(id int, name varchar) ENGINE \"" + EndlessTableEngine.class.getName() stat.execute("CREATE TABLE t1(id int, name varchar) ENGINE \"" +
+ "\" WITH \"param1\", \"param2\""); EndlessTableEngine.class.getName() + "\" WITH \"param1\", \"param2\"");
assertEquals(2, EndlessTableEngine.createTableData.tableEngineParams.size()); assertEquals(2, EndlessTableEngine.createTableData.tableEngineParams.size());
assertEquals("param1", EndlessTableEngine.createTableData.tableEngineParams.get(0)); assertEquals("param1", EndlessTableEngine.createTableData.tableEngineParams.get(0));
assertEquals("param2", EndlessTableEngine.createTableData.tableEngineParams.get(1)); assertEquals("param2", EndlessTableEngine.createTableData.tableEngineParams.get(1));
conn.close(); conn.close();
deleteDb("tableEngine"); deleteDb("tableEngine");
} }
private void testSimpleQuery() throws SQLException { private void testSimpleQuery() throws SQLException {
deleteDb("tableEngine"); deleteDb("tableEngine");
...@@ -367,7 +367,7 @@ public class TestTableEngines extends TestBase { ...@@ -367,7 +367,7 @@ public class TestTableEngines extends TestBase {
public static class EndlessTableEngine implements TableEngine { public static class EndlessTableEngine implements TableEngine {
public static CreateTableData createTableData; public static CreateTableData createTableData;
/** /**
* A table implementation with one row. * A table implementation with one row.
*/ */
......
...@@ -176,7 +176,11 @@ public class TestAutoReconnect extends TestBase { ...@@ -176,7 +176,11 @@ public class TestAutoReconnect extends TestBase {
} }
} }
/**
* A database event listener used in this test.
*/
public static final class MyDatabaseEventListener implements DatabaseEventListener { public static final class MyDatabaseEventListener implements DatabaseEventListener {
@Override @Override
public void closingDatabase() { public void closingDatabase() {
// ignore // ignore
......
...@@ -111,10 +111,13 @@ public class TestExit extends TestBase { ...@@ -111,10 +111,13 @@ public class TestExit extends TestBase {
return DriverManager.getConnection(url, "sa", ""); return DriverManager.getConnection(url, "sa", "");
} }
private static File getClosedFile() { static File getClosedFile() {
return new File(TestBase.BASE_TEST_DIR + "/closed.txt"); return new File(TestBase.BASE_TEST_DIR + "/closed.txt");
} }
/**
* A database event listener used in this test.
*/
public static final class MyDatabaseEventListener implements DatabaseEventListener { public static final class MyDatabaseEventListener implements DatabaseEventListener {
@Override @Override
......
...@@ -830,7 +830,11 @@ public class TestPageStore extends TestBase { ...@@ -830,7 +830,11 @@ public class TestPageStore extends TestBase {
trace(" " + m); trace(" " + m);
} }
/**
* A database event listener used in this test.
*/
public static final class MyDatabaseEventListener implements DatabaseEventListener { public static final class MyDatabaseEventListener implements DatabaseEventListener {
@Override @Override
public void closingDatabase() { public void closingDatabase() {
event("closing"); event("closing");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论