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

Test case for linking tables (supposed to fail in the network mode).

上级 7b675bd8
......@@ -34,6 +34,7 @@ public class TestLinkedTable extends TestBase {
}
public void test() throws SQLException {
testLinkedServerMode();
testDefaultValues();
testHiddenSQL();
// testLinkAutoAdd();
......@@ -53,6 +54,30 @@ public class TestLinkedTable extends TestBase {
deleteDb("linkedTable");
}
private void testLinkedServerMode() throws SQLException {
if (config.memory) {
return;
}
// the network mode will result in a deadlock
if (config.networked) {
return;
}
deleteDb("linkedTable1");
deleteDb("linkedTable2");
String url2 = getURL("linkedTable2", true);
String user = getUser(), password = getPassword();
Connection conn = getConnection("linkedTable2");
Statement stat = conn.createStatement();
stat.execute("create table test(id int)");
conn.close();
conn = getConnection("linkedTable1");
stat = conn.createStatement();
stat.execute("create linked table link(null, '"+url2+"', '"+user+"', '"+password+"', 'TEST')");
conn.close();
conn = getConnection("linkedTable1");
conn.close();
}
private void testDefaultValues() throws SQLException {
if (config.memory) {
return;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论