提交 26dfd8b0 authored 作者: Thomas Mueller's avatar Thomas Mueller

Support running the tests in the background.

上级 e9a38b68
......@@ -290,6 +290,11 @@ java org.h2.test.TestAll timer
*/
int throttle;
/**
* The THROTTLE value to use by default.
*/
int throttleDefault = Integer.parseInt(System.getProperty("throttle", "0"));
/**
* If the test should stop when the first error occurs.
*/
......
......@@ -271,7 +271,9 @@ public abstract class TestBase {
url = addOption(url, "TRACE_MAX_FILE_SIZE", "8");
}
url = addOption(url, "LOG", "1");
if (config.throttle > 0) {
if (config.throttleDefault > 0) {
url = addOption(url, "THROTTLE", "" + config.throttleDefault);
} else if (config.throttle > 0) {
url = addOption(url, "THROTTLE", "" + config.throttle);
}
url = addOption(url, "LOCK_TIMEOUT", "50");
......
......@@ -75,7 +75,7 @@ public class TestTriggersConstraints extends TestBase implements Trigger {
stat2.execute("update test set id = 2");
Task task = new Task() {
public void call() throws Exception {
Thread.sleep(200);
Thread.sleep(300);
stat2.execute("update test2 set id = 4");
}
};
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论