提交 9954f7e4 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 96b158c9
......@@ -54,14 +54,20 @@ public class TestFileLockSerialized extends TestBase {
String url = "jdbc:h2:" + baseDir + "/fileLockSerialized;FILE_LOCK=SERIALIZED;OPEN_NEW=TRUE";
int len = 3;
final Exception[] ex = new Exception[1];
final Connection[] conn = new Connection[len];
final Connection[] connList = new Connection[len];
final boolean[] stop = new boolean[1];
Thread[] threads = new Thread[len];
for (int i = 0; i < len; i++) {
final Connection c = DriverManager.getConnection(url);
conn[i] = c;
Connection conn;
try {
conn = DriverManager.getConnection(url);
} catch (SQLException e) {
throw new Exception("Can not connect " + len, e);
}
final Connection c = conn;
connList[i] = c;
if (i == 0) {
conn[i].createStatement().execute("create table test(id int) as select 1");
connList[i].createStatement().execute("create table test(id int) as select 1");
}
Thread t = new Thread(new Runnable() {
public void run() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论