Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
184b84e6
提交
184b84e6
authored
12月 19, 2007
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
8da94fcb
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
29 行增加
和
24 行删除
+29
-24
TestBase.java
h2/src/test/org/h2/test/TestBase.java
+0
-4
TestCrashAPI.java
h2/src/test/org/h2/test/synth/TestCrashAPI.java
+2
-2
TestKillRestart.java
h2/src/test/org/h2/test/synth/TestKillRestart.java
+5
-2
TestRandomSQL.java
h2/src/test/org/h2/test/synth/TestRandomSQL.java
+6
-3
TestExit.java
h2/src/test/org/h2/test/unit/TestExit.java
+3
-3
TestFileSystem.java
h2/src/test/org/h2/test/unit/TestFileSystem.java
+10
-7
TestTools.java
h2/src/test/org/h2/test/unit/TestTools.java
+3
-3
没有找到文件。
h2/src/test/org/h2/test/TestBase.java
浏览文件 @
184b84e6
...
...
@@ -38,10 +38,6 @@ public abstract class TestBase {
config
.
beforeTest
();
}
protected
void
stopServerIfRequired
()
throws
SQLException
{
config
.
afterTest
();
}
public
TestBase
init
(
TestAll
conf
)
throws
Exception
{
this
.
config
=
conf
;
return
this
;
...
...
h2/src/test/org/h2/test/synth/TestCrashAPI.java
浏览文件 @
184b84e6
...
...
@@ -362,7 +362,7 @@ public class TestCrashAPI extends TestBase {
public
TestBase
init
(
TestAll
conf
)
throws
Exception
{
super
.
init
(
conf
);
if
(
config
.
mvcc
)
{
if
(
config
.
mvcc
||
config
.
networked
)
{
return
this
;
}
if
(
config
.
logMode
==
0
)
{
...
...
@@ -385,7 +385,7 @@ public class TestCrashAPI extends TestBase {
}
public
void
test
()
throws
Exception
{
if
(
config
.
mvcc
)
{
if
(
config
.
mvcc
||
config
.
networked
)
{
return
;
}
int
len
=
getSize
(
2
,
6
);
...
...
h2/src/test/org/h2/test/synth/TestKillRestart.java
浏览文件 @
184b84e6
...
...
@@ -17,14 +17,17 @@ import org.h2.test.TestBase;
public
class
TestKillRestart
extends
TestBase
{
public
void
test
()
throws
Exception
{
if
(
config
.
networked
)
{
return
;
}
deleteDb
(
"corrupt"
);
String
url
=
getURL
(
"corrupt"
,
true
);
// String url = getURL("corrupt;CACHE_SIZE=2048;WRITE_DELAY=0;STORAGE=TEXT", true);
String
user
=
getUser
(),
password
=
getPassword
();
String
[]
procDef
=
new
String
[]
{
"java"
,
"-cp"
,
"bin"
,
getClass
().
getName
(),
"-url"
,
url
,
"-user"
,
user
,
"-password"
,
password
};
int
len
=
getSize
(
1
,
10
);
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
Process
p
=
Runtime
.
getRuntime
().
exec
(
procDef
);
...
...
h2/src/test/org/h2/test/synth/TestRandomSQL.java
浏览文件 @
184b84e6
...
...
@@ -73,13 +73,13 @@ public class TestRandomSQL extends TestBase {
}
}
private
void
deleteDb
()
throws
SQLException
{
String
name
=
getDatabaseName
();
if
(
name
.
startsWith
(
FileSystem
.
MEMORY_PREFIX
))
{
DeleteDbFiles
.
execute
(
"memFS:/"
,
name
,
true
);
DeleteDbFiles
.
execute
(
"memFS:/"
,
name
,
true
);
}
else
{
DeleteDbFiles
.
execute
(
baseDir
,
name
,
true
);
DeleteDbFiles
.
execute
(
baseDir
,
name
,
true
);
}
}
...
...
@@ -170,6 +170,9 @@ public class TestRandomSQL extends TestBase {
}
public
void
test
()
throws
Exception
{
if
(
config
.
networked
)
{
return
;
}
int
len
=
getSize
(
2
,
6
);
exitOnError
=
false
;
showSQL
=
false
;
...
...
h2/src/test/org/h2/test/unit/TestExit.java
浏览文件 @
184b84e6
...
...
@@ -16,7 +16,7 @@ import org.h2.test.TestBase;
public
class
TestExit
extends
TestBase
implements
DatabaseEventListener
{
public
void
test
()
throws
Exception
{
if
(
config
.
codeCoverage
)
{
if
(
config
.
codeCoverage
||
config
.
networked
)
{
return
;
}
String
classPath
=
"bin"
+
File
.
pathSeparator
+
"."
;
...
...
@@ -110,8 +110,8 @@ public class TestExit extends TestBase implements DatabaseEventListener {
public
void
init
(
String
url
)
{
}
public
void
opened
()
{
}
}
}
h2/src/test/org/h2/test/unit/TestFileSystem.java
浏览文件 @
184b84e6
...
...
@@ -30,8 +30,11 @@ public class TestFileSystem extends TestBase {
testFileSystem
(
FileSystem
.
MEMORY_PREFIX_LZF
);
testUserHome
();
}
private
void
testDatabaseInJar
()
throws
Exception
{
if
(
config
.
networked
)
{
return
;
}
Class
.
forName
(
"org.h2.Driver"
);
String
url
=
"jdbc:h2:"
+
baseDir
+
"/fsJar"
;
Connection
conn
=
DriverManager
.
getConnection
(
url
,
"sa"
,
"sa"
);
...
...
@@ -48,7 +51,7 @@ public class TestFileSystem extends TestBase {
stat
=
conn
.
createStatement
();
stat
.
execute
(
"backup to '"
+
baseDir
+
"/fsJar.zip'"
);
conn
.
close
();
deleteDb
(
baseDir
+
"/fsJar"
);
FileSystem
fs
=
FileSystem
.
getInstance
(
"zip:"
+
baseDir
+
"/fsJar.zip"
);
String
[]
files
=
fs
.
listFiles
(
"zip:"
+
baseDir
+
"/fsJar.zip"
);
...
...
@@ -88,7 +91,7 @@ public class TestFileSystem extends TestBase {
testTempFile
(
fsBase
);
testRandomAccess
(
fsBase
);
}
private
void
testSimple
(
String
fsBase
)
throws
Exception
{
FileSystem
fs
=
FileSystem
.
getInstance
(
fsBase
);
long
time
=
System
.
currentTimeMillis
();
...
...
@@ -131,10 +134,10 @@ public class TestFileSystem extends TestBase {
in
.
close
();
check
(
pos
,
10000
);
check
(
buffer2
,
buffer
);
check
(
fs
.
tryDelete
(
fsBase
+
"/test2"
));
fs
.
delete
(
fsBase
+
"/test"
);
if
(!
fsBase
.
startsWith
(
FileSystem
.
MEMORY_PREFIX
)
&&
!
fsBase
.
startsWith
(
FileSystem
.
MEMORY_PREFIX_LZF
))
{
fs
.
createDirs
(
fsBase
+
"/testDir/test"
);
check
(
fs
.
isDirectory
(
fsBase
+
"/testDir"
));
...
...
@@ -144,7 +147,7 @@ public class TestFileSystem extends TestBase {
}
}
}
private
void
testRandomAccess
(
String
fsBase
)
throws
Exception
{
FileSystem
fs
=
FileSystem
.
getInstance
(
fsBase
);
String
s
=
fs
.
createTempFile
(
fsBase
+
"/temp"
,
".tmp"
,
false
,
false
);
...
...
@@ -245,6 +248,6 @@ public class TestFileSystem extends TestBase {
in
.
close
();
out
.
close
();
}
}
h2/src/test/org/h2/test/unit/TestTools.java
浏览文件 @
184b84e6
...
...
@@ -33,6 +33,9 @@ public class TestTools extends TestBase {
private
Server
server
;
public
void
test
()
throws
Exception
{
if
(
config
.
networked
)
{
return
;
}
deleteDb
(
"utils"
);
testServerMain
();
testRemove
();
...
...
@@ -237,9 +240,6 @@ public class TestTools extends TestBase {
}
private
void
testManagementDb
()
throws
Exception
{
if
(
config
.
networked
)
{
return
;
}
int
count
=
getSize
(
2
,
10
);
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
Server
server
=
Server
.
createTcpServer
(
new
String
[]
{}).
start
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论