Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
c80aac29
提交
c80aac29
authored
11月 16, 2008
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete files after each test
上级
635c9e13
显示空白字符变更
内嵌
并排
正在显示
80 个修改的文件
包含
292 行增加
和
12 行删除
+292
-12
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+2
-0
TestAutoRecompile.java
h2/src/test/org/h2/test/db/TestAutoRecompile.java
+10
-0
TestBackup.java
h2/src/test/org/h2/test/db/TestBackup.java
+13
-0
TestBigDb.java
h2/src/test/org/h2/test/db/TestBigDb.java
+10
-0
TestBigResult.java
h2/src/test/org/h2/test/db/TestBigResult.java
+10
-0
TestCases.java
h2/src/test/org/h2/test/db/TestCases.java
+10
-0
TestCheckpoint.java
h2/src/test/org/h2/test/db/TestCheckpoint.java
+10
-0
TestCluster.java
h2/src/test/org/h2/test/db/TestCluster.java
+16
-3
TestCompatibility.java
h2/src/test/org/h2/test/db/TestCompatibility.java
+1
-1
TestCsv.java
h2/src/test/org/h2/test/db/TestCsv.java
+17
-1
TestDeadlock.java
h2/src/test/org/h2/test/db/TestDeadlock.java
+10
-1
TestEncryptedDb.java
h2/src/test/org/h2/test/db/TestEncryptedDb.java
+10
-0
TestExclusive.java
h2/src/test/org/h2/test/db/TestExclusive.java
+10
-1
TestFullText.java
h2/src/test/org/h2/test/db/TestFullText.java
+2
-1
TestFunctionOverload.java
h2/src/test/org/h2/test/db/TestFunctionOverload.java
+11
-1
TestFunctions.java
h2/src/test/org/h2/test/db/TestFunctions.java
+10
-0
TestIndex.java
h2/src/test/org/h2/test/db/TestIndex.java
+1
-0
TestLinkedTable.java
h2/src/test/org/h2/test/db/TestLinkedTable.java
+1
-0
TestListener.java
h2/src/test/org/h2/test/db/TestListener.java
+1
-1
TestLob.java
h2/src/test/org/h2/test/db/TestLob.java
+1
-0
TestLogFile.java
h2/src/test/org/h2/test/db/TestLogFile.java
+10
-0
TestMemoryUsage.java
h2/src/test/org/h2/test/db/TestMemoryUsage.java
+1
-0
TestMultiConn.java
h2/src/test/org/h2/test/db/TestMultiConn.java
+15
-0
TestMultiDimension.java
h2/src/test/org/h2/test/db/TestMultiDimension.java
+1
-0
TestOpenClose.java
h2/src/test/org/h2/test/db/TestOpenClose.java
+3
-0
TestOptimizations.java
h2/src/test/org/h2/test/db/TestOptimizations.java
+1
-0
TestOutOfMemory.java
h2/src/test/org/h2/test/db/TestOutOfMemory.java
+1
-0
TestPowerOff.java
h2/src/test/org/h2/test/db/TestPowerOff.java
+10
-0
TestReadOnly.java
h2/src/test/org/h2/test/db/TestReadOnly.java
+1
-0
TestRights.java
h2/src/test/org/h2/test/db/TestRights.java
+3
-0
TestRunscript.java
h2/src/test/org/h2/test/db/TestRunscript.java
+6
-0
TestSQLInjection.java
h2/src/test/org/h2/test/db/TestSQLInjection.java
+1
-0
TestScript.java
h2/src/test/org/h2/test/db/TestScript.java
+1
-0
TestScriptSimple.java
h2/src/test/org/h2/test/db/TestScriptSimple.java
+10
-0
TestSequence.java
h2/src/test/org/h2/test/db/TestSequence.java
+1
-0
TestSessionsLocks.java
h2/src/test/org/h2/test/db/TestSessionsLocks.java
+1
-0
TestSpaceReuse.java
h2/src/test/org/h2/test/db/TestSpaceReuse.java
+1
-0
TestSpeed.java
h2/src/test/org/h2/test/db/TestSpeed.java
+1
-0
TestTempTables.java
h2/src/test/org/h2/test/db/TestTempTables.java
+1
-0
TestTransaction.java
h2/src/test/org/h2/test/db/TestTransaction.java
+1
-0
TestTriggersConstraints.java
h2/src/test/org/h2/test/db/TestTriggersConstraints.java
+1
-0
TestTwoPhaseCommit.java
h2/src/test/org/h2/test/db/TestTwoPhaseCommit.java
+1
-0
TestView.java
h2/src/test/org/h2/test/db/TestView.java
+1
-0
TestBatchUpdates.java
h2/src/test/org/h2/test/jdbc/TestBatchUpdates.java
+1
-0
TestCallableStatement.java
h2/src/test/org/h2/test/jdbc/TestCallableStatement.java
+1
-0
TestCancel.java
h2/src/test/org/h2/test/jdbc/TestCancel.java
+10
-0
TestDatabaseEventListener.java
h2/src/test/org/h2/test/jdbc/TestDatabaseEventListener.java
+1
-0
TestManyJdbcObjects.java
h2/src/test/org/h2/test/jdbc/TestManyJdbcObjects.java
+10
-0
TestMetaData.java
h2/src/test/org/h2/test/jdbc/TestMetaData.java
+1
-0
TestNativeSQL.java
h2/src/test/org/h2/test/jdbc/TestNativeSQL.java
+1
-0
TestPreparedStatement.java
h2/src/test/org/h2/test/jdbc/TestPreparedStatement.java
+1
-0
TestResultSet.java
h2/src/test/org/h2/test/jdbc/TestResultSet.java
+1
-0
TestStatement.java
h2/src/test/org/h2/test/jdbc/TestStatement.java
+1
-0
TestTransactionIsolation.java
h2/src/test/org/h2/test/jdbc/TestTransactionIsolation.java
+1
-0
TestUpdatableResultSet.java
h2/src/test/org/h2/test/jdbc/TestUpdatableResultSet.java
+1
-0
TestZloty.java
h2/src/test/org/h2/test/jdbc/TestZloty.java
+1
-0
TestConnectionPool.java
h2/src/test/org/h2/test/jdbcx/TestConnectionPool.java
+1
-0
TestDataSource.java
h2/src/test/org/h2/test/jdbcx/TestDataSource.java
+1
-0
TestXA.java
h2/src/test/org/h2/test/jdbcx/TestXA.java
+3
-0
TestMvcc1.java
h2/src/test/org/h2/test/mvcc/TestMvcc1.java
+1
-0
TestMvcc2.java
h2/src/test/org/h2/test/mvcc/TestMvcc2.java
+1
-0
TestMvcc3.java
h2/src/test/org/h2/test/mvcc/TestMvcc3.java
+1
-0
TestMvccMultiThreaded.java
h2/src/test/org/h2/test/mvcc/TestMvccMultiThreaded.java
+1
-0
TestRowLocks.java
h2/src/test/org/h2/test/rowlock/TestRowLocks.java
+1
-0
TestAutoReconnect.java
h2/src/test/org/h2/test/server/TestAutoReconnect.java
+1
-0
TestAutoServer.java
h2/src/test/org/h2/test/server/TestAutoServer.java
+1
-0
TestNestedLoop.java
h2/src/test/org/h2/test/server/TestNestedLoop.java
+1
-1
TestPgServer.java
h2/src/test/org/h2/test/server/TestPgServer.java
+1
-0
TestFuzzOptimizations.java
h2/src/test/org/h2/test/synth/TestFuzzOptimizations.java
+1
-0
TestKillRestart.java
h2/src/test/org/h2/test/synth/TestKillRestart.java
+1
-0
TestKillRestartMulti.java
h2/src/test/org/h2/test/synth/TestKillRestartMulti.java
+2
-1
TestMultiThreaded.java
h2/src/test/org/h2/test/synth/TestMultiThreaded.java
+1
-0
TestRandomSQL.java
h2/src/test/org/h2/test/synth/TestRandomSQL.java
+5
-0
TestCache.java
h2/src/test/org/h2/test/unit/TestCache.java
+1
-0
TestDate.java
h2/src/test/org/h2/test/unit/TestDate.java
+2
-0
TestExit.java
h2/src/test/org/h2/test/unit/TestExit.java
+1
-0
TestMultiThreadedKernel.java
h2/src/test/org/h2/test/unit/TestMultiThreadedKernel.java
+1
-0
TestRecovery.java
h2/src/test/org/h2/test/unit/TestRecovery.java
+1
-0
TestSampleApps.java
h2/src/test/org/h2/test/unit/TestSampleApps.java
+1
-0
TestTools.java
h2/src/test/org/h2/test/unit/TestTools.java
+1
-0
没有找到文件。
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
c80aac29
...
...
@@ -284,6 +284,8 @@ java org.h2.test.TestAll timer
split files (1 GB max size)
allocating space gets slower and slower the larger the database.
test trace_level_file=3 performance (when throwing exceptions)
study SQLite file format
multithreaded kernel
...
...
h2/src/test/org/h2/test/db/TestAutoRecompile.java
浏览文件 @
c80aac29
...
...
@@ -18,6 +18,15 @@ import org.h2.test.TestBase;
*/
public
class
TestAutoRecompile
extends
TestBase
{
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
SQLException
{
deleteDb
(
"autoRecompile"
);
Connection
conn
=
getConnection
(
"autoRecompile"
);
...
...
@@ -47,6 +56,7 @@ public class TestAutoRecompile extends TestBase {
assertKnownException
(
e
);
}
conn
.
close
();
deleteDb
(
"autoRecompile"
);
}
}
h2/src/test/org/h2/test/db/TestBackup.java
浏览文件 @
c80aac29
...
...
@@ -12,17 +12,28 @@ import java.sql.Statement;
import
org.h2.test.TestBase
;
import
org.h2.tools.Restore
;
import
org.h2.util.FileUtils
;
/**
* Test for the BACKUP SQL statement.
*/
public
class
TestBackup
extends
TestBase
{
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
SQLException
{
if
(
config
.
memory
||
config
.
logMode
==
0
)
{
return
;
}
testBackup
();
deleteDb
(
"backup"
);
}
private
void
testBackup
()
throws
SQLException
{
...
...
@@ -54,6 +65,8 @@ public class TestBackup extends TestBase {
conn1
.
close
();
conn2
.
close
();
conn3
.
close
();
deleteDb
(
"restored"
);
FileUtils
.
delete
(
baseDir
+
"/backup.zip"
);
}
}
h2/src/test/org/h2/test/db/TestBigDb.java
浏览文件 @
c80aac29
...
...
@@ -20,6 +20,15 @@ import org.h2.util.MemoryUtils;
*/
public
class
TestBigDb
extends
TestBase
{
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
SQLException
{
if
(
config
.
memory
)
{
return
;
...
...
@@ -30,6 +39,7 @@ public class TestBigDb extends TestBase {
testLargeTable
();
testInsert
();
testLeftSummary
();
deleteDb
(
"bigDb"
);
}
private
void
testLargeTable
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestBigResult.java
浏览文件 @
c80aac29
...
...
@@ -21,6 +21,15 @@ import org.h2.test.TestBase;
*/
public
class
TestBigResult
extends
TestBase
{
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
SQLException
{
if
(
config
.
memory
)
{
return
;
...
...
@@ -30,6 +39,7 @@ public class TestBigResult extends TestBase {
testCloseConnectionDelete
();
testOrderGroup
();
testLimitBufferedResult
();
deleteDb
(
"bigResult"
);
}
private
void
testLargeSubquery
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestCases.java
浏览文件 @
c80aac29
...
...
@@ -26,6 +26,15 @@ import org.h2.test.TestBase;
*/
public
class
TestCases
extends
TestBase
{
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
Exception
{
testInvalidDatabaseName
();
testReuseSpace
();
...
...
@@ -55,6 +64,7 @@ public class TestCases extends TestBase {
testDoubleRecovery
();
testConstraintReconnect
();
testCollation
();
deleteDb
(
"cases"
);
}
private
void
testInvalidDatabaseName
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestCheckpoint.java
浏览文件 @
c80aac29
...
...
@@ -17,6 +17,15 @@ import org.h2.test.TestBase;
*/
public
class
TestCheckpoint
extends
TestBase
{
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
SQLException
{
// TODO test checkpoint with rollback, not only just run the command
deleteDb
(
"checkpoint"
);
...
...
@@ -42,6 +51,7 @@ public class TestCheckpoint extends TestBase {
c0
.
close
();
c1
.
close
();
deleteDb
(
"checkpoint"
);
}
}
h2/src/test/org/h2/test/db/TestCluster.java
浏览文件 @
c80aac29
...
...
@@ -23,13 +23,20 @@ import org.h2.tools.Server;
*/
public
class
TestCluster
extends
TestBase
{
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
SQLException
{
if
(
config
.
memory
||
config
.
networked
)
{
return
;
}
DeleteDbFiles
.
main
(
new
String
[]
{
"-dir"
,
baseDir
+
"/node1"
,
"-quiet"
});
DeleteDbFiles
.
main
(
new
String
[]
{
"-dir"
,
baseDir
+
"/node2"
,
"-quiet"
});
deleteFiles
();
// create the master database
Connection
conn
;
...
...
@@ -122,6 +129,12 @@ public class TestCluster extends TestBase {
conn
.
createStatement
().
execute
(
"SELECT * FROM A"
);
conn
.
close
();
n2
.
stop
();
deleteFiles
();
}
private
void
deleteFiles
()
throws
SQLException
{
DeleteDbFiles
.
main
(
new
String
[]
{
"-dir"
,
baseDir
+
"/node1"
,
"-quiet"
});
DeleteDbFiles
.
main
(
new
String
[]
{
"-dir"
,
baseDir
+
"/node2"
,
"-quiet"
});
}
private
void
check
(
Connection
conn
,
int
len
)
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestCompatibility.java
浏览文件 @
c80aac29
...
...
@@ -43,7 +43,7 @@ public class TestCompatibility extends TestBase {
testMySQL
();
conn
.
close
();
deleteDb
(
"compatibility"
);
}
private
void
testColumnAlias
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestCsv.java
浏览文件 @
c80aac29
...
...
@@ -33,6 +33,15 @@ import org.h2.util.StringUtils;
*/
public
class
TestCsv
extends
TestBase
{
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
Exception
{
testSpaceSeparated
();
testNull
();
...
...
@@ -43,6 +52,7 @@ public class TestCsv extends TestBase {
testWriteRead
();
testRead
();
testPipe
();
deleteDb
(
"csv"
);
}
private
void
testSpaceSeparated
()
throws
SQLException
{
...
...
@@ -138,6 +148,7 @@ public class TestCsv extends TestBase {
}
assertFalse
(
rs
.
next
());
conn
.
close
();
FileUtils
.
delete
(
baseDir
+
"/test.csv"
);
}
private
String
randomData
(
Random
random
)
{
...
...
@@ -173,6 +184,7 @@ public class TestCsv extends TestBase {
assertEquals
(
rs
.
getString
(
2
),
"Hello"
);
assertFalse
(
rs
.
next
());
conn
.
close
();
FileUtils
.
delete
(
baseDir
+
"/test.csv"
);
}
private
void
testFieldDelimiter
()
throws
Exception
{
...
...
@@ -203,6 +215,8 @@ public class TestCsv extends TestBase {
assertEquals
(
rs
.
getString
(
2
),
"\nHello*\n"
);
assertFalse
(
rs
.
next
());
conn
.
close
();
FileUtils
.
delete
(
baseDir
+
"/test.csv"
);
FileUtils
.
delete
(
baseDir
+
"/test2.csv"
);
}
private
void
testPipe
()
throws
SQLException
{
...
...
@@ -225,6 +239,7 @@ public class TestCsv extends TestBase {
// rs = prep.executeQuery();
conn
.
close
();
FileUtils
.
delete
(
baseDir
+
"/test.csv"
);
}
private
void
testAsTable
()
throws
SQLException
{
...
...
@@ -287,6 +302,7 @@ public class TestCsv extends TestBase {
// 201,2,0,18
// 201,2,0,18
// 201,2,0,18
FileUtils
.
delete
(
baseDir
+
"/test.csv"
);
}
private
void
testWriteRead
()
throws
SQLException
{
...
...
@@ -313,7 +329,7 @@ public class TestCsv extends TestBase {
assertFalse
(
rs
.
next
());
rs
.
close
();
conn
.
close
();
FileUtils
.
delete
(
baseDir
+
"/testRW.csv"
);
}
}
h2/src/test/org/h2/test/db/TestDeadlock.java
浏览文件 @
c80aac29
...
...
@@ -33,13 +33,22 @@ public class TestDeadlock extends TestBase {
Connection
c3
;
private
volatile
SQLException
lastException
;
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
Exception
{
deleteDb
(
"deadlock"
);
testDiningPhilosophers
();
testLockUpgrade
();
testThreePhilosophers
();
testNoDeadlock
();
deleteDb
(
"deadlock"
);
}
private
void
initTest
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestEncryptedDb.java
浏览文件 @
c80aac29
...
...
@@ -18,6 +18,15 @@ import org.h2.test.TestBase;
*/
public
class
TestEncryptedDb
extends
TestBase
{
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
SQLException
{
if
(
config
.
memory
||
config
.
cipher
!=
null
)
{
return
;
...
...
@@ -51,6 +60,7 @@ public class TestEncryptedDb extends TestBase {
assertFalse
(
rs
.
next
());
conn
.
close
();
deleteDb
(
"exclusive"
);
}
}
h2/src/test/org/h2/test/db/TestExclusive.java
浏览文件 @
c80aac29
...
...
@@ -17,6 +17,15 @@ import org.h2.test.TestBase;
*/
public
class
TestExclusive
extends
TestBase
{
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
Exception
{
deleteDb
(
"exclusive"
);
Connection
conn
=
getConnection
(
"exclusive"
);
...
...
@@ -64,7 +73,7 @@ public class TestExclusive extends TestBase {
// check that exclusive mode is off when disconnected
stat2
.
execute
(
"select * from dual"
);
conn2
.
close
();
deleteDb
(
"exclusive"
);
}
}
h2/src/test/org/h2/test/db/TestFullText.java
浏览文件 @
c80aac29
...
...
@@ -54,7 +54,8 @@ public class TestFullText extends TestBase {
println
(
"Class not found, not tested: "
+
luceneFullTextClassName
);
// ok
}
deleteDb
(
"fullText"
);
deleteDb
(
"fullTextReopen"
);
}
private
void
testCreateDrop
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestFunctionOverload.java
浏览文件 @
c80aac29
...
...
@@ -25,8 +25,17 @@ public class TestFunctionOverload extends TestBase {
private
Connection
conn
;
private
DatabaseMetaData
meta
;
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
SQLException
{
this
.
deleteDb
(
"functionOverload"
);
deleteDb
(
"functionOverload"
);
conn
=
getConnection
(
"functionOverload"
);
meta
=
conn
.
getMetaData
();
testControl
();
...
...
@@ -35,6 +44,7 @@ public class TestFunctionOverload extends TestBase {
testOverloadWithConnection
();
testOverloadError
();
conn
.
close
();
deleteDb
(
"functionOverload"
);
}
private
void
testOverloadError
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestFunctions.java
浏览文件 @
c80aac29
...
...
@@ -32,11 +32,21 @@ import org.h2.util.IOUtils;
*/
public
class
TestFunctions
extends
TestBase
{
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
Exception
{
testVarArgs
();
testAggregate
();
testFunctions
();
testFileRead
();
deleteDb
(
"functions"
);
}
private
void
testVarArgs
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestIndex.java
浏览文件 @
c80aac29
...
...
@@ -69,6 +69,7 @@ public class TestIndex extends TestBase {
testMultiColumnHashIndex
();
conn
.
close
();
deleteDb
(
"index"
);
}
private
void
testHashIndex
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestLinkedTable.java
浏览文件 @
c80aac29
...
...
@@ -43,6 +43,7 @@ public class TestLinkedTable extends TestBase {
testLinkEmitUpdates
();
testLinkTable
();
testLinkTwoTables
();
deleteDb
(
"linkedTable"
);
}
// this is not a bug, it is the documented behavior
...
...
h2/src/test/org/h2/test/db/TestListener.java
浏览文件 @
c80aac29
...
...
@@ -48,7 +48,7 @@ public class TestListener extends TestBase implements DatabaseEventListener {
conn
=
getConnection
(
"listener;database_event_listener='"
+
getClass
().
getName
()
+
"'"
);
conn
.
close
();
deleteDb
(
"listener"
);
}
public
void
diskSpaceIsLow
(
long
stillAvailable
)
{
...
...
h2/src/test/org/h2/test/db/TestLob.java
浏览文件 @
c80aac29
...
...
@@ -71,6 +71,7 @@ public class TestLob extends TestBase {
testLob
(
false
);
testLob
(
true
);
testJavaObject
();
deleteDb
(
"lob"
);
}
private
void
testLobDeleteTemp
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestLogFile.java
浏览文件 @
c80aac29
...
...
@@ -25,6 +25,15 @@ public class TestLogFile extends TestBase {
private
static
final
int
MAX_LOG_SIZE
=
1
;
private
Connection
conn
;
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
private
long
reconnect
(
int
maxFiles
)
throws
SQLException
{
if
(
conn
!=
null
)
{
conn
.
close
();
...
...
@@ -64,6 +73,7 @@ public class TestLogFile extends TestBase {
}
finally
{
System
.
setProperty
(
SysProperties
.
H2_LOG_DELETE_DELAY
,
""
+
old
);
}
deleteDb
(
"logfile"
);
}
private
void
checkLogSize
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestMemoryUsage.java
浏览文件 @
c80aac29
...
...
@@ -45,6 +45,7 @@ public class TestMemoryUsage extends TestBase {
reconnect
();
insertUpdateSelectDelete
();
conn
.
close
();
deleteDb
(
"memoryUsage"
);
}
private
void
testCreateDropLoop
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestMultiConn.java
浏览文件 @
c80aac29
...
...
@@ -21,11 +21,21 @@ public class TestMultiConn extends TestBase implements DatabaseEventListener {
private
static
int
wait
;
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
Exception
{
testConcurrentShutdownQuery
();
testCommitRollback
();
testConcurrentOpen
();
testThreeThreads
();
deleteDb
(
"multiConn"
);
}
private
void
testConcurrentShutdownQuery
()
throws
Exception
{
...
...
@@ -53,6 +63,11 @@ public class TestMultiConn extends TestBase implements DatabaseEventListener {
Thread
.
sleep
(
50
);
stat1
.
execute
(
"SHUTDOWN"
);
conn1
.
close
();
try
{
conn2
.
close
();
}
catch
(
SQLException
e
)
{
// ignore
}
}
private
void
testThreeThreads
()
throws
Exception
{
...
...
h2/src/test/org/h2/test/db/TestMultiDimension.java
浏览文件 @
c80aac29
...
...
@@ -130,6 +130,7 @@ public class TestMultiDimension extends TestBase {
// trace("t1="+time1+" t2="+time2+" size="+size);
}
conn
.
close
();
deleteDb
(
"multiDimension"
);
}
/**
...
...
h2/src/test/org/h2/test/db/TestOpenClose.java
浏览文件 @
c80aac29
...
...
@@ -16,6 +16,7 @@ import java.sql.Statement;
import
org.h2.api.DatabaseEventListener
;
import
org.h2.test.TestBase
;
import
org.h2.tools.Restore
;
import
org.h2.util.FileUtils
;
/**
* Tests opening and closing a database.
...
...
@@ -30,6 +31,7 @@ public class TestOpenClose extends TestBase implements DatabaseEventListener {
testBackup
(
true
);
testCase
();
testReconnectFast
();
deleteDb
(
"openClose"
);
}
private
void
testCloseDelay
()
throws
Exception
{
...
...
@@ -72,6 +74,7 @@ public class TestOpenClose extends TestBase implements DatabaseEventListener {
assertEquals
(
rs
.
getString
(
1
).
length
(),
10000
);
assertFalse
(
rs
.
next
());
conn
.
close
();
FileUtils
.
delete
(
baseDir
+
"/test.zip"
);
}
private
void
testReconnectFast
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestOptimizations.java
浏览文件 @
c80aac29
...
...
@@ -53,6 +53,7 @@ public class TestOptimizations extends TestBase {
testIn
();
testMinMaxCountOptimization
(
true
);
testMinMaxCountOptimization
(
false
);
deleteDb
(
"optimizations"
);
}
private
void
testInSelectJoin
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestOutOfMemory.java
浏览文件 @
c80aac29
...
...
@@ -63,6 +63,7 @@ public class TestOutOfMemory extends TestBase {
}
finally
{
conn
.
close
();
}
deleteDb
(
"outOfMemory"
);
}
private
void
eatMemory
(
int
remainingKB
)
{
...
...
h2/src/test/org/h2/test/db/TestPowerOff.java
浏览文件 @
c80aac29
...
...
@@ -33,6 +33,15 @@ public class TestPowerOff extends TestBase {
private
int
maxPowerOffCount
;
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
SQLException
{
if
(
config
.
memory
||
config
.
logMode
==
0
)
{
return
;
...
...
@@ -49,6 +58,7 @@ public class TestPowerOff extends TestBase {
testNoIndexFile
();
testMemoryTables
();
testPersistentTables
();
deleteDb
(
dir
,
dbName
);
}
private
void
testSummaryCrash
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestReadOnly.java
浏览文件 @
c80aac29
...
...
@@ -32,6 +32,7 @@ public class TestReadOnly extends TestBase {
if
(!
config
.
deleteIndex
)
{
testReadOnlyFiles
(
false
);
}
deleteDb
(
"readonly"
);
}
private
void
testReadOnlyDbCreate
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestRights.java
浏览文件 @
c80aac29
...
...
@@ -13,6 +13,7 @@ import java.sql.SQLException;
import
java.sql.Statement
;
import
org.h2.test.TestBase
;
import
org.h2.util.FileUtils
;
/**
* Access rights tests.
...
...
@@ -26,6 +27,7 @@ public class TestRights extends TestBase {
// testLowerCaseUser();
testSchemaRenameUser
();
testAccessRights
();
deleteDb
(
"rights"
);
}
// public void testLowerCaseUser() throws SQLException {
...
...
@@ -234,6 +236,7 @@ public class TestRights extends TestBase {
conn
.
close
();
conn
=
getConnection
(
"rights"
);
conn
.
close
();
FileUtils
.
delete
(
baseDir
+
"/rights.sql"
);
}
private
void
testTableType
(
Connection
conn
,
String
type
)
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestRunscript.java
浏览文件 @
c80aac29
...
...
@@ -12,6 +12,7 @@ import java.sql.Statement;
import
org.h2.api.Trigger
;
import
org.h2.test.TestBase
;
import
org.h2.util.FileUtils
;
/**
* Tests the RUNSCRIPT SQL statement.
...
...
@@ -21,6 +22,7 @@ public class TestRunscript extends TestBase implements Trigger {
public
void
test
()
throws
SQLException
{
test
(
false
);
test
(
true
);
deleteDb
(
"runscript"
);
}
/**
...
...
@@ -89,6 +91,10 @@ public class TestRunscript extends TestBase implements Trigger {
conn1
.
close
();
conn2
.
close
();
deleteDb
(
"runscriptRestore"
);
FileUtils
.
delete
(
baseDir
+
"/backup.2.sql"
);
FileUtils
.
delete
(
baseDir
+
"/backup.3.sql"
);
}
public
void
init
(
Connection
conn
,
String
schemaName
,
String
triggerName
,
String
tableName
,
boolean
before
,
int
type
)
{
...
...
h2/src/test/org/h2/test/db/TestSQLInjection.java
浏览文件 @
c80aac29
...
...
@@ -81,6 +81,7 @@ public class TestSQLInjection extends TestBase {
assertTrue
(
checkPasswordSecure
(
"123456"
));
assertFalse
(
checkPasswordSecure
(
"' OR ''='"
));
conn
.
close
();
deleteDb
(
"sqlInjection"
);
}
private
boolean
checkPasswordInsecure
(
String
pwd
)
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestScript.java
浏览文件 @
c80aac29
...
...
@@ -81,6 +81,7 @@ public class TestScript extends TestBase {
testScript
();
}
}
deleteDb
(
"script"
);
}
private
void
testScript
()
throws
Exception
{
...
...
h2/src/test/org/h2/test/db/TestScriptSimple.java
浏览文件 @
c80aac29
...
...
@@ -24,6 +24,15 @@ public class TestScriptSimple extends TestBase {
private
Connection
conn
;
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
Exception
{
if
(
config
.
memory
||
config
.
big
||
config
.
networked
)
{
return
;
...
...
@@ -62,6 +71,7 @@ public class TestScriptSimple extends TestBase {
}
is
.
close
();
conn
.
close
();
deleteDb
(
"scriptSimple"
);
}
private
void
reconnect
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestSequence.java
浏览文件 @
c80aac29
...
...
@@ -23,6 +23,7 @@ public class TestSequence extends TestBase {
testAlterSequence
();
testCache
();
testTwo
();
deleteDb
(
"sequence"
);
}
private
void
testAlterSequenceColumn
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestSessionsLocks.java
浏览文件 @
c80aac29
...
...
@@ -24,6 +24,7 @@ public class TestSessionsLocks extends TestBase {
}
testCancelStatement
();
testLocks
();
deleteDb
(
"sessionsLocks"
);
}
private
void
testLocks
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestSpaceReuse.java
浏览文件 @
c80aac29
...
...
@@ -41,6 +41,7 @@ public class TestSpaceReuse extends TestBase {
if
(
now
>
first
)
{
fail
(
"first: "
+
first
+
" now: "
+
now
);
}
deleteDb
(
"spaceReuse"
);
}
}
h2/src/test/org/h2/test/db/TestSpeed.java
浏览文件 @
c80aac29
...
...
@@ -156,6 +156,7 @@ public class TestSpeed extends TestBase {
conn
.
close
();
time
=
System
.
currentTimeMillis
()
-
time
;
trace
(
time
+
" close"
);
deleteDb
(
"speed"
);
}
// private void testOuterJoin() throws SQLException {
...
...
h2/src/test/org/h2/test/db/TestTempTables.java
浏览文件 @
c80aac29
...
...
@@ -35,6 +35,7 @@ public class TestTempTables extends TestBase {
testIndexes
(
c1
,
c2
);
c1
.
close
();
c2
.
close
();
deleteDb
(
"tempTables"
);
}
private
void
testIndexes
(
Connection
conn1
,
Connection
conn2
)
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestTransaction.java
浏览文件 @
c80aac29
...
...
@@ -28,6 +28,7 @@ public class TestTransaction extends TestBase {
testReferential
();
testSavepoint
();
testIsolation
();
deleteDb
(
"transaction"
);
}
private
void
testSetTransaction
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestTriggersConstraints.java
浏览文件 @
c80aac29
...
...
@@ -30,6 +30,7 @@ public class TestTriggersConstraints extends TestBase implements Trigger {
testTriggerAlterTable
();
testTriggers
();
testConstraints
();
deleteDb
(
"trigger"
);
}
/**
...
...
h2/src/test/org/h2/test/db/TestTwoPhaseCommit.java
浏览文件 @
c80aac29
...
...
@@ -32,6 +32,7 @@ public class TestTwoPhaseCommit extends TestBase {
prepare
();
openWith
(
false
);
test
(
false
);
deleteDb
(
"twoPhaseCommit"
);
}
private
void
test
(
boolean
rolledBack
)
throws
SQLException
{
...
...
h2/src/test/org/h2/test/db/TestView.java
浏览文件 @
c80aac29
...
...
@@ -21,6 +21,7 @@ public class TestView extends TestBase {
public
void
test
()
throws
SQLException
{
testUnionReconnect
();
testManyViews
();
deleteDb
(
"view"
);
}
private
void
testUnionReconnect
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/jdbc/TestBatchUpdates.java
浏览文件 @
c80aac29
...
...
@@ -47,6 +47,7 @@ public class TestBatchUpdates extends TestBase {
testExecuteCall
();
testException
();
testCoffee
();
deleteDb
(
"batchUpdates"
);
}
private
void
testExecuteCall
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/jdbc/TestCallableStatement.java
浏览文件 @
c80aac29
...
...
@@ -24,6 +24,7 @@ public class TestCallableStatement extends TestBase {
Connection
conn
=
getConnection
(
"preparedStatement"
);
testPrepare
(
conn
);
conn
.
close
();
deleteDb
(
"callableStatement"
);
}
private
void
testPrepare
(
Connection
conn
)
throws
SQLException
{
...
...
h2/src/test/org/h2/test/jdbc/TestCancel.java
浏览文件 @
c80aac29
...
...
@@ -24,6 +24,15 @@ public class TestCancel extends TestBase {
private
static
int
lastVisited
;
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
/**
* This thread cancels a statement after some time.
*/
...
...
@@ -66,6 +75,7 @@ public class TestCancel extends TestBase {
testQueryTimeout
();
testJdbcQueryTimeout
();
testCancelStatement
();
deleteDb
(
"cancel"
);
}
private
void
testReset
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/jdbc/TestDatabaseEventListener.java
浏览文件 @
c80aac29
...
...
@@ -26,6 +26,7 @@ public class TestDatabaseEventListener extends TestBase implements DatabaseEvent
testCalled
();
testCloseLog0
(
false
);
testCloseLog0
(
true
);
deleteDb
(
"databaseEventListener"
);
}
private
void
testCloseLog0
(
boolean
shutdown
)
throws
SQLException
{
...
...
h2/src/test/org/h2/test/jdbc/TestManyJdbcObjects.java
浏览文件 @
c80aac29
...
...
@@ -21,10 +21,20 @@ import org.h2.test.TestBase;
*/
public
class
TestManyJdbcObjects
extends
TestBase
{
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
SQLException
{
testNestedResultSets
();
testManyConnections
();
testOneConnectionPrepare
();
deleteDb
(
"manyObjects"
);
}
private
void
testNestedResultSets
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/jdbc/TestMetaData.java
浏览文件 @
c80aac29
...
...
@@ -207,6 +207,7 @@ public class TestMetaData extends TestBase {
conn
.
close
();
testTempTable
();
deleteDb
(
"metaData"
);
}
...
...
h2/src/test/org/h2/test/jdbc/TestNativeSQL.java
浏览文件 @
c80aac29
...
...
@@ -64,6 +64,7 @@ public class TestNativeSQL extends TestBase {
testQuotes
();
conn
.
close
();
assertTrue
(
conn
.
isClosed
());
deleteDb
(
"nativeSql"
);
}
private
void
testQuotes
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/jdbc/TestPreparedStatement.java
浏览文件 @
c80aac29
...
...
@@ -60,6 +60,7 @@ public class TestPreparedStatement extends TestBase {
testClob
(
conn
);
testParameterMetaData
(
conn
);
conn
.
close
();
deleteDb
(
"preparedStatement"
);
}
private
void
testLobTempFiles
(
Connection
conn
)
throws
SQLException
{
...
...
h2/src/test/org/h2/test/jdbc/TestResultSet.java
浏览文件 @
c80aac29
...
...
@@ -78,6 +78,7 @@ public class TestResultSet extends TestBase {
testAutoIncrement
();
conn
.
close
();
deleteDb
(
"resultSet"
);
}
...
...
h2/src/test/org/h2/test/jdbc/TestStatement.java
浏览文件 @
c80aac29
...
...
@@ -46,6 +46,7 @@ public class TestStatement extends TestBase {
testIdentity
();
}
conn
.
close
();
deleteDb
(
"statement"
);
}
private
void
testTraceError
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/jdbc/TestTransactionIsolation.java
浏览文件 @
c80aac29
...
...
@@ -92,6 +92,7 @@ public class TestTransactionIsolation extends TestBase {
conn1
.
close
();
conn2
.
close
();
deleteDb
(
"transactionIsolation"
);
}
}
h2/src/test/org/h2/test/jdbc/TestUpdatableResultSet.java
浏览文件 @
c80aac29
...
...
@@ -33,6 +33,7 @@ public class TestUpdatableResultSet extends TestBase {
testUpdateDeleteInsert
();
testUpdateDataType
();
testUpdateResetRead
();
deleteDb
(
"updatableResultSet"
);
}
private
void
testUpdateLob
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/jdbc/TestZloty.java
浏览文件 @
c80aac29
...
...
@@ -23,6 +23,7 @@ public class TestZloty extends TestBase {
public
void
test
()
throws
SQLException
{
testZloty
();
testModifyBytes
();
deleteDb
(
"zloty"
);
}
/**
...
...
h2/src/test/org/h2/test/jdbcx/TestConnectionPool.java
浏览文件 @
c80aac29
...
...
@@ -23,6 +23,7 @@ public class TestConnectionPool extends TestBase {
deleteDb
(
"connectionPool"
);
testConnect
();
testThreads
();
deleteDb
(
"connectionPool"
);
}
private
void
testThreads
()
throws
Exception
{
...
...
h2/src/test/org/h2/test/jdbcx/TestDataSource.java
浏览文件 @
c80aac29
...
...
@@ -51,6 +51,7 @@ public class TestDataSource extends TestBase {
public
void
test
()
throws
Exception
{
testDataSource
();
testXAConnection
();
deleteDb
(
baseDir
,
"dataSource"
);
}
private
void
testXAConnection
()
throws
Exception
{
...
...
h2/src/test/org/h2/test/jdbcx/TestXA.java
浏览文件 @
c80aac29
...
...
@@ -34,6 +34,9 @@ public class TestXA extends TestBase {
deleteDb
(
baseDir
,
DB_NAME1
);
deleteDb
(
baseDir
,
DB_NAME2
);
testXA
(
false
);
deleteDb
(
baseDir
,
"xa"
);
deleteDb
(
baseDir
,
DB_NAME1
);
deleteDb
(
baseDir
,
DB_NAME2
);
}
/**
...
...
h2/src/test/org/h2/test/mvcc/TestMvcc1.java
浏览文件 @
c80aac29
...
...
@@ -26,6 +26,7 @@ public class TestMvcc1 extends TestBase {
public
void
test
()
throws
SQLException
{
testSetMode
();
testCases
();
deleteDb
(
"mvcc1"
);
}
private
void
testSetMode
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/mvcc/TestMvcc2.java
浏览文件 @
c80aac29
...
...
@@ -29,6 +29,7 @@ public class TestMvcc2 extends TestBase {
deleteDb
(
"mvcc2"
);
testInsertUpdateRollback
();
testInsertRollback
();
deleteDb
(
"mvcc2"
);
}
private
Connection
getConnection
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/mvcc/TestMvcc3.java
浏览文件 @
c80aac29
...
...
@@ -23,6 +23,7 @@ public class TestMvcc3 extends TestBase {
testSequence
();
testDisableAutoCommit
();
testRollback
();
deleteDb
(
"mvcc3"
);
}
private
void
testCreateTableAsSelect
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/mvcc/TestMvccMultiThreaded.java
浏览文件 @
c80aac29
...
...
@@ -64,6 +64,7 @@ public class TestMvccMultiThreaded extends TestBase {
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
connList
[
i
].
close
();
}
deleteDb
(
"mvccMultiThreaded"
);
}
}
h2/src/test/org/h2/test/rowlock/TestRowLocks.java
浏览文件 @
c80aac29
...
...
@@ -37,6 +37,7 @@ public class TestRowLocks extends TestBase {
public
void
test
()
throws
Exception
{
testSetMode
();
testCases
();
deleteDb
(
"rowLocks"
);
}
private
void
testSetMode
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/server/TestAutoReconnect.java
浏览文件 @
c80aac29
...
...
@@ -56,6 +56,7 @@ public class TestAutoReconnect extends TestBase implements DatabaseEventListener
public
void
test
()
throws
Exception
{
testReconnect
(
true
);
testReconnect
(
false
);
deleteDb
(
"autoReconnect"
);
}
private
void
testReconnect
(
boolean
autoServer
)
throws
Exception
{
...
...
h2/src/test/org/h2/test/server/TestAutoServer.java
浏览文件 @
c80aac29
...
...
@@ -71,6 +71,7 @@ public class TestAutoServer extends TestBase {
}
conn
.
close
();
connServer
.
close
();
deleteDb
(
"autoServer"
);
}
/**
...
...
h2/src/test/org/h2/test/server/TestNestedLoop.java
浏览文件 @
c80aac29
...
...
@@ -61,7 +61,7 @@ public class TestNestedLoop extends TestBase {
}
}
conn
.
close
();
deleteDb
(
"nestedLoop"
);
}
}
h2/src/test/org/h2/test/server/TestPgServer.java
浏览文件 @
c80aac29
...
...
@@ -44,6 +44,7 @@ public class TestPgServer extends TestBase {
}
finally
{
server
.
stop
();
}
deleteDb
(
"test"
);
}
private
void
testPgClient
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/synth/TestFuzzOptimizations.java
浏览文件 @
c80aac29
...
...
@@ -39,6 +39,7 @@ public class TestFuzzOptimizations extends TestBase {
testGroupSorted
();
testInSelect
();
conn
.
close
();
deleteDb
(
"optimizations"
);
}
private
void
testInSelect
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/synth/TestKillRestart.java
浏览文件 @
c80aac29
...
...
@@ -64,6 +64,7 @@ public class TestKillRestart extends TestBase {
}
}
}
deleteDb
(
"killRestart"
);
}
/**
...
...
h2/src/test/org/h2/test/synth/TestKillRestartMulti.java
浏览文件 @
c80aac29
...
...
@@ -114,6 +114,7 @@ public class TestKillRestartMulti extends TestBase {
throw
e
;
}
}
deleteDb
(
"killRestartMulti"
);
}
/**
...
...
h2/src/test/org/h2/test/synth/TestMultiThreaded.java
浏览文件 @
c80aac29
...
...
@@ -169,6 +169,7 @@ public class TestMultiThreaded extends TestBase {
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
connList
[
i
].
close
();
}
deleteDb
(
"multiThreaded"
);
}
}
h2/src/test/org/h2/test/synth/TestRandomSQL.java
浏览文件 @
c80aac29
...
...
@@ -176,6 +176,11 @@ public class TestRandomSQL extends TestBase {
}
testWithSeed
(
bnf
);
SysProperties
.
scriptDirectory
=
old
;
try
{
deleteDb
();
}
catch
(
SQLException
e
)
{
processException
(
"deleteDb"
,
e
);
}
}
public
void
test
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/unit/TestCache.java
浏览文件 @
c80aac29
...
...
@@ -53,6 +53,7 @@ public class TestCache extends TestBase {
}
}
conn
.
close
();
deleteDb
(
"cache"
);
}
}
h2/src/test/org/h2/test/unit/TestDate.java
浏览文件 @
c80aac29
...
...
@@ -72,6 +72,8 @@ public class TestDate extends TestBase {
TimeZone
.
setDefault
(
defaultTimeZone
);
DateTimeUtils
.
resetCalendar
();
}
conn
.
close
();
deleteDb
(
"date"
);
}
private
void
test
(
PreparedStatement
prep
,
int
d
)
throws
SQLException
{
...
...
h2/src/test/org/h2/test/unit/TestExit.java
浏览文件 @
c80aac29
...
...
@@ -63,6 +63,7 @@ public class TestExit extends TestBase implements DatabaseEventListener {
if
(
getClosedFile
().
exists
())
{
fail
(
"closed database"
);
}
deleteDb
(
"exit"
);
}
/**
...
...
h2/src/test/org/h2/test/unit/TestMultiThreadedKernel.java
浏览文件 @
c80aac29
...
...
@@ -47,6 +47,7 @@ public class TestMultiThreadedKernel extends TestBase implements Runnable {
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
list
[
i
].
join
();
}
deleteDb
(
"multiThreadedKernel"
);
}
public
void
run
()
{
...
...
h2/src/test/org/h2/test/unit/TestRecovery.java
浏览文件 @
c80aac29
...
...
@@ -39,6 +39,7 @@ public class TestRecovery extends TestBase {
// Recover.execute("data", null);
Connection
conn
=
DriverManager
.
getConnection
(
url
,
"sa"
,
"sa"
);
conn
.
close
();
DeleteDbFiles
.
execute
(
baseDir
,
"recovery"
,
true
);
}
}
h2/src/test/org/h2/test/unit/TestSampleApps.java
浏览文件 @
c80aac29
...
...
@@ -25,6 +25,7 @@ public class TestSampleApps extends TestBase {
String
url
=
"jdbc:h2:"
+
baseDir
+
"/optimizations"
;
testApp
(
org
.
h2
.
tools
.
RunScript
.
class
,
new
String
[]
{
"-url"
,
url
,
"-user"
,
"sa"
,
"-password"
,
"sa"
,
"-script"
,
"src/test/org/h2/samples/optimizations.sql"
,
"-checkResults"
},
""
);
deleteDb
(
"optimizations"
);
testApp
(
org
.
h2
.
samples
.
Compact
.
class
,
null
,
"Compacting...\nDone."
);
testApp
(
org
.
h2
.
samples
.
CsvSample
.
class
,
null
,
"NAME: Bob Meier\n"
+
"EMAIL: bob.meier@abcde.abc\n"
...
...
h2/src/test/org/h2/test/unit/TestTools.java
浏览文件 @
c80aac29
...
...
@@ -67,6 +67,7 @@ public class TestTools extends TestBase {
testScriptRunscript
();
testBackupRestore
();
testRecover
();
deleteDb
(
"utils"
);
}
private
void
testServerMain
()
throws
SQLException
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论