return;
server = new Server();
server.setDatabaseName(0, DATABASE_NAME);
server.setDatabasePath(0, "mem:" + DATABASE_NAME);
server.setSilent(true);
server.start();
try {
Class.forName("org.hsqldb.jdbcDriver");
}
catch(ClassNotFoundException cnfe) {
throw new RuntimeException(cnfe);
}
LineNumberReader reader = null;
try {
reader = new LineNumberReader(new InputStreamReader(DatabaseFixture.class.getClassLoader().getResourceAsStream(SCHEMA_FILE)));
for(;;) {
String line = reader.readLine();
if(line==null) break;
// 将text类型的字段改为varchar(2000),因为HSQLDB不支持text:
line = line.trim().replace(" text ", " varchar(2000) ").replace(" text,", " varchar(2000),");
if(!line.equals(""))
文章来源于领测软件测试网 https://www.ltesting.net/