提交 4d1e5e1e authored 作者: Thomas Mueller's avatar Thomas Mueller

Formatting, code conventions

上级 508b1a2e
...@@ -860,7 +860,7 @@ This database synchronizes access to the same connection, but other databases ma ...@@ -860,7 +860,7 @@ This database synchronizes access to the same connection, but other databases ma
To get higher concurrency, you need to use multiple connections. To get higher concurrency, you need to use multiple connections.
</p> </p>
<p> <p>
By default, requests to the same database are synchronized. By default, requests to the same database are synchronized.
That means an application can use multiple threads that access the same database That means an application can use multiple threads that access the same database
at the same time, however if one thread executes a long running query, the other threads need to wait. at the same time, however if one thread executes a long running query, the other threads need to wait.
To enable concurrent database usage, see the setting <code>MULTI_THREADED</code>. To enable concurrent database usage, see the setting <code>MULTI_THREADED</code>.
......
...@@ -380,6 +380,9 @@ java org.h2.test.TestAll timer ...@@ -380,6 +380,9 @@ java org.h2.test.TestAll timer
*/ */
AbbaLockingDetector abbaLockingDetector; AbbaLockingDetector abbaLockingDetector;
/**
* The list of tests.
*/
ArrayList<TestBase> tests = New.arrayList(); ArrayList<TestBase> tests = New.arrayList();
private Server server; private Server server;
......
...@@ -150,8 +150,10 @@ public class TestCases extends TestBase { ...@@ -150,8 +150,10 @@ public class TestCases extends TestBase {
stat.execute("create table parent(id int primary key)"); stat.execute("create table parent(id int primary key)");
stat.execute("create table child(id int, parent_id int, x int)"); stat.execute("create table child(id int, parent_id int, x int)");
stat.execute("create index y on child(parent_id, x)"); stat.execute("create index y on child(parent_id, x)");
stat.execute("alter table child add constraint z foreign key(parent_id) references parent(id)"); stat.execute("alter table child add constraint z " +
ResultSet rs = stat.executeQuery("select * from information_schema.indexes where table_name = 'CHILD'"); "foreign key(parent_id) references parent(id)");
ResultSet rs = stat.executeQuery(
"select * from information_schema.indexes where table_name = 'CHILD'");
while (rs.next()) { while (rs.next()) {
assertEquals("Y", rs.getString("index_name")); assertEquals("Y", rs.getString("index_name"));
} }
......
...@@ -202,7 +202,8 @@ public class TestWeb extends TestBase { ...@@ -202,7 +202,8 @@ public class TestWeb extends TestBase {
assertTrue(FileUtils.exists(getBaseDir() + "/" + getTestName() + ".h2.sql")); assertTrue(FileUtils.exists(getBaseDir() + "/" + getTestName() + ".h2.sql"));
FileUtils.delete(getBaseDir() + "/web.h2.sql"); FileUtils.delete(getBaseDir() + "/web.h2.sql");
result = client.get(url, "tools.do?tool=RunScript&args=-script," + result = client.get(url, "tools.do?tool=RunScript&args=-script," +
getBaseDir() + "/" + getTestName() + ".h2.sql,-url," + getURL(getTestName(), true) + getBaseDir() + "/" + getTestName() + ".h2.sql,-url," +
getURL(getTestName(), true) +
",-user," + getUser() + ",-password," + getPassword()); ",-user," + getUser() + ",-password," + getPassword());
FileUtils.delete(getBaseDir() + "/" + getTestName() + ".h2.sql"); FileUtils.delete(getBaseDir() + "/" + getTestName() + ".h2.sql");
assertTrue(FileUtils.exists(fn)); assertTrue(FileUtils.exists(fn));
......
...@@ -784,14 +784,14 @@ public class Build extends BuildBase { ...@@ -784,14 +784,14 @@ public class Build extends BuildBase {
public void test() { public void test() {
test(false); test(false);
} }
/** /**
* Compile and run all fast tests. This does not include the compile step. * Compile and run all fast tests. This does not include the compile step.
*/ */
public void testFast() { public void testFast() {
test(true); test(true);
} }
private void test(boolean fast) { private void test(boolean fast) {
downloadTest(); downloadTest();
String cp = "temp" + File.pathSeparator + "bin" + String cp = "temp" + File.pathSeparator + "bin" +
...@@ -810,12 +810,12 @@ public class Build extends BuildBase { ...@@ -810,12 +810,12 @@ public class Build extends BuildBase {
exec("java", args( exec("java", args(
"-Xmx128m", "-Xmx128m",
"-cp", cp, "-cp", cp,
"org.h2.test.TestAll", "fast")); "org.h2.test.TestAll", "fast"));
} else { } else {
exec("java", args( exec("java", args(
"-Xmx128m", "-Xmx128m",
"-cp", cp, "-cp", cp,
"org.h2.test.TestAll")); "org.h2.test.TestAll"));
} }
} }
......
...@@ -771,3 +771,4 @@ young sweep clearer accounting disappeared donor oome ken jorissen nesterov ...@@ -771,3 +771,4 @@ young sweep clearer accounting disappeared donor oome ken jorissen nesterov
degradation failures fashion disjunctive mentioned conjunctive misses broke degradation failures fashion disjunctive mentioned conjunctive misses broke
authenticate orphaned registrations topology planner authenticate orphaned registrations topology planner
zepfred frederico thimel arnaud manipulating strongly lots aquiles younger needing zepfred frederico thimel arnaud manipulating strongly lots aquiles younger needing
unrecognized five omitting registering
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论