Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
43e1956c
提交
43e1956c
authored
11 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MVStore: tests
上级
247b99f2
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
13 行增加
和
4 行删除
+13
-4
TestKillProcessWhileWriting.java
...c/test/org/h2/test/store/TestKillProcessWhileWriting.java
+1
-1
TestMVStore.java
h2/src/test/org/h2/test/store/TestMVStore.java
+8
-1
TestRandomMapOps.java
h2/src/test/org/h2/test/store/TestRandomMapOps.java
+4
-2
没有找到文件。
h2/src/test/org/h2/test/store/TestKillProcessWhileWriting.java
浏览文件 @
43e1956c
...
...
@@ -85,7 +85,7 @@ public class TestKillProcessWhileWriting extends TestBase {
Random
r
=
new
Random
(
seed
);
int
op
=
0
;
try
{
for
(;
op
<
5
0
;
op
++)
{
for
(;
op
<
10
0
;
op
++)
{
int
k
=
r
.
nextInt
(
100
);
byte
[]
v
=
new
byte
[
r
.
nextInt
(
100
)
*
100
];
int
type
=
r
.
nextInt
(
10
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/store/TestMVStore.java
浏览文件 @
43e1956c
...
...
@@ -5,6 +5,7 @@
*/
package
org
.
h2
.
test
.
store
;
import
java.io.PrintWriter
;
import
java.lang.Thread.UncaughtExceptionHandler
;
import
java.nio.ByteBuffer
;
import
java.nio.channels.FileChannel
;
...
...
@@ -18,6 +19,7 @@ import org.h2.mvstore.Cursor;
import
org.h2.mvstore.DataUtils
;
import
org.h2.mvstore.MVMap
;
import
org.h2.mvstore.MVStore
;
import
org.h2.mvstore.MVStoreTool
;
import
org.h2.mvstore.OffHeapStore
;
import
org.h2.mvstore.type.DataType
;
import
org.h2.mvstore.type.ObjectDataType
;
...
...
@@ -63,7 +65,7 @@ public class TestMVStore extends TestBase {
testCacheSize
();
testConcurrentOpen
();
testFileHeader
();
testFileHeaderCorruption
();
//
testFileHeaderCorruption();
testIndexSkip
();
testMinMaxNextKey
();
testStoreVersion
();
...
...
@@ -595,6 +597,8 @@ public class TestMVStore extends TestBase {
// test corrupt file headers
for
(
int
i
=
0
;
i
<=
blockSize
;
i
+=
blockSize
)
{
FileChannel
fc
=
f
.
open
(
"rw"
);
MVStoreTool
.
dump
(
fileName
,
new
PrintWriter
(
System
.
out
));
if
(
i
==
0
)
{
// corrupt the last block (the end header)
fc
.
truncate
(
fc
.
size
()
-
4096
);
...
...
@@ -610,6 +614,9 @@ public class TestMVStore extends TestBase {
buff
.
rewind
();
fc
.
write
(
buff
,
i
);
fc
.
close
();
MVStoreTool
.
dump
(
fileName
,
new
PrintWriter
(
System
.
out
));
if
(
i
==
0
)
{
// if the first header is corrupt, the second
// header should be used
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/store/TestRandomMapOps.java
浏览文件 @
43e1956c
...
...
@@ -32,7 +32,9 @@ public class TestRandomMapOps extends TestBase {
* @param a ignored
*/
public
static
void
main
(
String
...
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
TestBase
test
=
TestBase
.
createCaller
().
init
();
test
.
config
.
big
=
true
;
test
.
test
();
}
@Override
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论