提交 31e446dc authored 作者: Thomas Mueller's avatar Thomas Mueller

Statement.cancel() had no effect when using the server mode.

上级 860a10eb
...@@ -46,12 +46,12 @@ public class TestRunscript extends TestBase implements Trigger { ...@@ -46,12 +46,12 @@ public class TestRunscript extends TestBase implements Trigger {
stat.execute("create table test(id int primary key) as select x from system_range(1, 10000)"); stat.execute("create table test(id int primary key) as select x from system_range(1, 10000)");
stat.execute("script simple drop to '"+getBaseDir()+"/backup.sql'"); stat.execute("script simple drop to '"+getBaseDir()+"/backup.sql'");
stat.execute("set throttle 1000"); stat.execute("set throttle 1000");
// need to wait a bit (throttle is only used every 50 ms)
Thread.sleep(100);
final String dir = getBaseDir(); final String dir = getBaseDir();
final SQLException[] ex = new SQLException[1]; final SQLException[] ex = new SQLException[1];
Thread thread; Thread thread;
SQLException e; SQLException e;
ex[0] = null;
thread = new Thread() { thread = new Thread() {
public void run() { public void run() {
try { try {
...@@ -69,6 +69,11 @@ public class TestRunscript extends TestBase implements Trigger { ...@@ -69,6 +69,11 @@ public class TestRunscript extends TestBase implements Trigger {
assertTrue(e != null); assertTrue(e != null);
assertEquals(ErrorCode.STATEMENT_WAS_CANCELED, e.getErrorCode()); assertEquals(ErrorCode.STATEMENT_WAS_CANCELED, e.getErrorCode());
ex[0] = null;
stat.execute("set throttle 1000");
// need to wait a bit (throttle is only used every 50 ms)
Thread.sleep(100);
thread = new Thread() { thread = new Thread() {
public void run() { public void run() {
try { try {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论