Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
e5e738be
提交
e5e738be
authored
17 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
649b8164
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
137 行增加
和
108 行删除
+137
-108
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+122
-100
TestBase.java
h2/src/test/org/h2/test/TestBase.java
+3
-2
TestBtreeIndex.java
h2/src/test/org/h2/test/synth/TestBtreeIndex.java
+2
-1
TestCrashAPI.java
h2/src/test/org/h2/test/synth/TestCrashAPI.java
+3
-2
TestSynth.java
h2/src/test/org/h2/test/synth/sql/TestSynth.java
+5
-3
TestTools.java
h2/src/test/org/h2/test/unit/TestTools.java
+2
-0
没有找到文件。
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
e5e738be
...
...
@@ -445,109 +445,131 @@ Roadmap:
// db
//
new TestScriptSimple().runTest(this);
//
new TestScript().runTest(this);
//
new TestAutoRecompile().runTest(this);
//
new TestBackup().runTest(this);
//
new TestBigDb().runTest(this);
//
new TestBigResult().runTest(this);
//
new TestCases().runTest(this);
//
new TestCheckpoint().runTest(this);
//
new TestCluster().runTest(this);
//
new TestCompatibility().runTest(this);
//
new TestCsv().runTest(this);
//
new TestEncryptedDb().runTest(this);
//
new TestExclusive().runTest(this);
//
new TestFullText().runTest(this);
//
new TestFunctions().runTest(this);
//
new TestIndex().runTest(this);
//
new TestLinkedTable().runTest(this);
//
new TestListener().runTest(this);
//
new TestLob().runTest(this);
//
new TestLogFile().runTest(this);
//
new TestMemoryUsage().runTest(this);
//
new TestMultiConn().runTest(this);
//
new TestMultiDimension().runTest(this);
//
new TestMultiThread().runTest(this);
//
new TestOpenClose().runTest(this);
//
new TestOptimizations().runTest(this);
//
new TestPowerOff().runTest(this);
//
new TestReadOnly().runTest(this);
//
new TestRights().runTest(this);
//
new TestRunscript().runTest(this);
//
new TestSQLInjection().runTest(this);
//
new TestSessionsLocks().runTest(this);
//
new TestSequence().runTest(this);
//
new TestSpaceReuse().runTest(this);
//
new TestSpeed().runTest(this);
//
new TestTempTables().runTest(this);
//
new TestTransaction().runTest(this);
//
new TestTriggersConstraints().runTest(this);
//
new TestTwoPhaseCommit().runTest(this);
//
new TestView().runTest(this);
//
//
// jdbc
//
new TestBatchUpdates().runTest(this);
//
new TestCallableStatement().runTest(this);
//
new TestCancel().runTest(this);
//
new TestDatabaseEventListener().runTest(this);
//
new TestManyJdbcObjects().runTest(this);
//
new TestMetaData().runTest(this);
//
new TestNativeSQL().runTest(this);
//
new TestPreparedStatement().runTest(this);
//
new TestResultSet().runTest(this);
//
new TestStatement().runTest(this);
//
new TestTransactionIsolation().runTest(this);
//
new TestUpdatableResultSet().runTest(this);
//
new TestZloty().runTest(this);
//
//
// jdbcx
//
new TestDataSource().runTest(this);
//
new TestXA().runTest(this);
//
new TestXASimple().runTest(this);
//
//
// server
//
new TestNestedLoop().runTest(this);
//
new TestWeb().runTest(this);
//
new TestPgServer().runTest(this);
//
//
// mvcc
//
new TestMvcc1().runTest(this);
//
new TestMvcc2().runTest(this);
//
new TestMvcc3().runTest(this);
//
//
// synth
//
new TestCrashAPI().runTest(this);
//
new TestRandomSQL().runTest(this);
//
new TestKillRestart().runTest(this);
//
new TestKillRestartMulti().runTest(this);
//
//
// unit
//
new TestBitField().runTest(this);
//
new TestCache().runTest(this);
//
new TestCompress().runTest(this);
//
new TestDataPage().runTest(this);
new
TestScriptSimple
().
runTest
(
this
);
new
TestScript
().
runTest
(
this
);
new
TestAutoRecompile
().
runTest
(
this
);
new
TestBackup
().
runTest
(
this
);
new
TestBigDb
().
runTest
(
this
);
new
TestBigResult
().
runTest
(
this
);
new
TestCases
().
runTest
(
this
);
new
TestCheckpoint
().
runTest
(
this
);
new
TestCluster
().
runTest
(
this
);
new
TestCompatibility
().
runTest
(
this
);
new
TestCsv
().
runTest
(
this
);
new
TestEncryptedDb
().
runTest
(
this
);
new
TestExclusive
().
runTest
(
this
);
new
TestFullText
().
runTest
(
this
);
new
TestFunctions
().
runTest
(
this
);
new
TestIndex
().
runTest
(
this
);
new
TestLinkedTable
().
runTest
(
this
);
new
TestListener
().
runTest
(
this
);
new
TestLob
().
runTest
(
this
);
new
TestLogFile
().
runTest
(
this
);
new
TestMemoryUsage
().
runTest
(
this
);
new
TestMultiConn
().
runTest
(
this
);
new
TestMultiDimension
().
runTest
(
this
);
new
TestMultiThread
().
runTest
(
this
);
new
TestOpenClose
().
runTest
(
this
);
new
TestOptimizations
().
runTest
(
this
);
new
TestPowerOff
().
runTest
(
this
);
new
TestReadOnly
().
runTest
(
this
);
new
TestRights
().
runTest
(
this
);
new
TestRunscript
().
runTest
(
this
);
new
TestSQLInjection
().
runTest
(
this
);
new
TestSessionsLocks
().
runTest
(
this
);
new
TestSequence
().
runTest
(
this
);
new
TestSpaceReuse
().
runTest
(
this
);
new
TestSpeed
().
runTest
(
this
);
new
TestTempTables
().
runTest
(
this
);
new
TestTransaction
().
runTest
(
this
);
new
TestTriggersConstraints
().
runTest
(
this
);
new
TestTwoPhaseCommit
().
runTest
(
this
);
new
TestView
().
runTest
(
this
);
// jdbc
new
TestBatchUpdates
().
runTest
(
this
);
new
TestCallableStatement
().
runTest
(
this
);
new
TestCancel
().
runTest
(
this
);
new
TestDatabaseEventListener
().
runTest
(
this
);
new
TestManyJdbcObjects
().
runTest
(
this
);
new
TestMetaData
().
runTest
(
this
);
new
TestNativeSQL
().
runTest
(
this
);
new
TestPreparedStatement
().
runTest
(
this
);
new
TestResultSet
().
runTest
(
this
);
new
TestStatement
().
runTest
(
this
);
new
TestTransactionIsolation
().
runTest
(
this
);
new
TestUpdatableResultSet
().
runTest
(
this
);
new
TestZloty
().
runTest
(
this
);
// jdbcx
new
TestDataSource
().
runTest
(
this
);
new
TestXA
().
runTest
(
this
);
new
TestXASimple
().
runTest
(
this
);
// server
new
TestNestedLoop
().
runTest
(
this
);
new
TestWeb
().
runTest
(
this
);
new
TestPgServer
().
runTest
(
this
);
// mvcc
new
TestMvcc1
().
runTest
(
this
);
new
TestMvcc2
().
runTest
(
this
);
new
TestMvcc3
().
runTest
(
this
);
// synth
new
TestCrashAPI
().
runTest
(
this
);
new
TestRandomSQL
().
runTest
(
this
);
new
TestKillRestart
().
runTest
(
this
);
new
TestKillRestartMulti
().
runTest
(
this
);
// unit
new
TestBitField
().
runTest
(
this
);
new
TestCache
().
runTest
(
this
);
new
TestCompress
().
runTest
(
this
);
new
TestDataPage
().
runTest
(
this
);
new
TestDate
().
runTest
(
this
);
new
TestExit
().
runTest
(
this
);
new
TestFile
().
runTest
(
this
);
// new TestFileLock().runTest(this);
// new TestFtp().runTest(this);
// new TestFileSystem().runTest(this);
// new TestIntArray().runTest(this);
// new TestIntIntHashMap().runTest(this);
// new TestMultiThreadedKernel().runTest(this);
// new TestOverflow().runTest(this);
// new TestPattern().runTest(this);
// new TestReader().runTest(this);
// new TestRecovery().runTest(this);
// new TestSampleApps().runTest(this);
// new TestScriptReader().runTest(this);
// runTest("org.h2.test.unit.TestServlet");
// new TestSecurity().runTest(this);
// new TestStreams().runTest(this);
// new TestStringCache().runTest(this);
// new TestStringUtils().runTest(this);
// new TestTools().runTest(this);
new
TestFileLock
().
runTest
(
this
);
new
TestFtp
().
runTest
(
this
);
new
TestFileSystem
().
runTest
(
this
);
new
TestIntArray
().
runTest
(
this
);
new
TestIntIntHashMap
().
runTest
(
this
);
new
TestMultiThreadedKernel
().
runTest
(
this
);
new
TestOverflow
().
runTest
(
this
);
new
TestPattern
().
runTest
(
this
);
new
TestReader
().
runTest
(
this
);
new
TestRecovery
().
runTest
(
this
);
new
TestSampleApps
().
runTest
(
this
);
new
TestScriptReader
().
runTest
(
this
);
runTest
(
"org.h2.test.unit.TestServlet"
);
new
TestSecurity
().
runTest
(
this
);
new
TestStreams
().
runTest
(
this
);
new
TestStringCache
().
runTest
(
this
);
new
TestStringUtils
().
runTest
(
this
);
new
TestTools
().
runTest
(
this
);
new
TestValue
().
runTest
(
this
);
new
TestValueHashMap
().
runTest
(
this
);
new
TestValueMemory
().
runTest
(
this
);
new
TestFile
().
runTest
(
this
);
new
TestFileLock
().
runTest
(
this
);
new
TestFtp
().
runTest
(
this
);
new
TestFileSystem
().
runTest
(
this
);
new
TestIntArray
().
runTest
(
this
);
new
TestIntIntHashMap
().
runTest
(
this
);
new
TestMultiThreadedKernel
().
runTest
(
this
);
new
TestOverflow
().
runTest
(
this
);
new
TestPattern
().
runTest
(
this
);
new
TestReader
().
runTest
(
this
);
new
TestRecovery
().
runTest
(
this
);
new
TestSampleApps
().
runTest
(
this
);
new
TestScriptReader
().
runTest
(
this
);
runTest
(
"org.h2.test.unit.TestServlet"
);
new
TestSecurity
().
runTest
(
this
);
new
TestStreams
().
runTest
(
this
);
new
TestStringCache
().
runTest
(
this
);
new
TestStringUtils
().
runTest
(
this
);
new
TestTools
().
runTest
(
this
);
new
TestValue
().
runTest
(
this
);
new
TestValueHashMap
().
runTest
(
this
);
new
TestValueMemory
().
runTest
(
this
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/TestBase.java
浏览文件 @
e5e738be
...
...
@@ -34,10 +34,10 @@ public abstract class TestBase {
private
static
final
String
BASE_TEST_DIR
=
"data"
;
public
static
String
getTestDir
(
String
name
)
{
return
BASE_TEST_DIR
+
"/test
-
"
+
name
;
return
BASE_TEST_DIR
+
"/test"
+
name
;
}
protected
static
String
baseDir
=
BASE_TEST_DIR
+
"/test"
;
protected
static
String
baseDir
=
getTestDir
(
""
)
;
protected
TestAll
config
;
private
long
start
;
...
...
@@ -47,6 +47,7 @@ public abstract class TestBase {
}
public
TestBase
init
(
TestAll
conf
)
throws
Exception
{
baseDir
=
getTestDir
(
""
);
this
.
config
=
conf
;
return
this
;
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/synth/TestBtreeIndex.java
浏览文件 @
e5e738be
...
...
@@ -30,9 +30,10 @@ public class TestBtreeIndex extends TestBase {
}
public
void
testCase
(
int
seed
)
throws
Exception
{
String
old
=
baseDir
;
baseDir
=
TestBase
.
getTestDir
(
"index"
);
testOne
(
seed
);
baseDir
=
"data"
;
baseDir
=
old
;
}
private
void
testOne
(
int
seed
)
throws
Exception
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/synth/TestCrashAPI.java
浏览文件 @
e5e738be
...
...
@@ -401,12 +401,13 @@ public class TestCrashAPI extends TestBase {
public
void
testCase
(
int
i
)
throws
Exception
{
int
old
=
SysProperties
.
getMaxQueryTimeout
();
String
oldBaseDir
=
baseDir
;
try
{
System
.
setProperty
(
SysProperties
.
H2_MAX_QUERY_TIMEOUT
,
""
+
10000
);
baseDir
=
"dataCrash"
;
baseDir
=
TestBase
.
getTestDir
(
"crash"
)
;
testOne
(
i
);
}
finally
{
baseDir
=
"data"
;
baseDir
=
oldBaseDir
;
System
.
setProperty
(
SysProperties
.
H2_MAX_QUERY_TIMEOUT
,
""
+
old
);
}
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/synth/sql/TestSynth.java
浏览文件 @
e5e738be
...
...
@@ -217,6 +217,7 @@ public class TestSynth extends TestBase {
public
TestBase
init
(
TestAll
conf
)
throws
Exception
{
super
.
init
(
conf
);
String
old
=
baseDir
;
baseDir
=
TestBase
.
getTestDir
(
"synth"
);
deleteDb
(
"synth"
);
databases
=
new
ArrayList
();
...
...
@@ -261,12 +262,13 @@ public class TestSynth extends TestBase {
// original (0):
// System.exit(0);
baseDir
=
"data"
;
baseDir
=
old
;
return
this
;
}
public
void
testCase
(
int
i
)
throws
Exception
{
baseDir
=
"dataCrash"
;
String
old
=
baseDir
;
baseDir
=
TestBase
.
getTestDir
(
"synth"
);
deleteDb
(
baseDir
,
DIR
+
"/synth"
);
try
{
printTime
(
"TestSynth "
+
i
);
...
...
@@ -275,7 +277,7 @@ public class TestSynth extends TestBase {
TestBase
.
logError
(
"error"
,
e
);
System
.
exit
(
0
);
}
baseDir
=
"data"
;
baseDir
=
old
;
}
public
void
test
()
throws
Exception
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestTools.java
浏览文件 @
e5e738be
...
...
@@ -211,6 +211,7 @@ public class TestTools extends TestBase {
}
private
void
testRemove
()
throws
Exception
{
deleteDb
(
"toolsRemove"
);
Class
.
forName
(
"org.h2.Driver"
);
String
url
=
"jdbc:h2:"
+
baseDir
+
"/toolsRemove"
;
Connection
conn
=
DriverManager
.
getConnection
(
url
,
"sa"
,
"sa"
);
...
...
@@ -237,6 +238,7 @@ public class TestTools extends TestBase {
}
private
void
testRecover
()
throws
Exception
{
deleteDb
(
"toolsRecover"
);
Class
.
forName
(
"org.h2.Driver"
);
String
url
=
"jdbc:h2:"
+
baseDir
+
"/toolsRecover"
;
Connection
conn
=
DriverManager
.
getConnection
(
url
,
"sa"
,
"sa"
);
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论