提交 fa1a87b4 authored 作者: Thomas Mueller's avatar Thomas Mueller

Support testing the GaeVFS (virtual file system for Google App Engine). Thanks to Vince Bonfanti!

上级 fbb45d90
......@@ -227,6 +227,11 @@ java org.h2.test.TestAll timer
*/
public boolean traceTest;
/**
* If testing on Google App Engine.
*/
public boolean googleAppEngine;
/**
* If the transaction log files should be kept small (that is, log files
* should be switched early).
......
......@@ -219,6 +219,8 @@ public abstract class TestBase {
} else {
url = "tcp://localhost:9192/" + name;
}
} else if (config.googleAppEngine) {
url = "gae://" + name + ";FILE_LOCK=NO;AUTO_SERVER=FALSE;DB_CLOSE_ON_EXIT=FALSE";
} else {
url = name;
}
......@@ -1108,7 +1110,16 @@ public abstract class TestBase {
* @return the new test
*/
public static TestBase createCaller() {
String className = new Exception().getStackTrace()[1].getClassName();
return createCaller(new Exception().getStackTrace()[1].getClassName());
}
/**
* Create a new object of the given class.
*
* @param className the class name
* @return the new test
*/
public static TestBase createCaller(String className) {
org.h2.Driver.load();
try {
return (TestBase) Class.forName(className).newInstance();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论