Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [8, 17, 21]
java: [8]
steps:
- name: Checkout source
uses: actions/checkout@v4
Expand Down
5 changes: 1 addition & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,11 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<!-- 跳过单元测试 -->
<skip>true</skip>
<skipTests>true</skipTests>
<!-- forkMode 可设置值有 “never”, “once”, “always” 和 “pertest”。 pretest:
每一个测试创建一个新进程,为每个测试创建新的JVM是单独测试的最彻底方式,但也是最慢的,不适合hudson上持续回归。 once:在一个进程中进行所有测试。once为默认设置,在Hudson上持续回归时建议使用默认设置。
always:在一个进程中并行的运行脚本,Junit4.7以上版本才可以使用,surefire的版本要在2.6以上提供这个功能,其中 threadCount:执行时,指定可分配的线程数量。只和参数parallel配合使用有效。默认:5。 -->
<forkMode>once</forkMode>
<argLine>-Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8</argLine>
<argLine>-Xmx1024m -Dfile.encoding=UTF-8</argLine>
<additionalClasspathElements>
<additionalClasspathElement>${basedir}/target/test-classes</additionalClasspathElement>
</additionalClasspathElements>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,12 @@ public void otherMethod(){
List<String> list = myDbEnvironment.getDatabaseNames();//取得当前环境下数据库名称列表
System.out.println(list);

env.renameDatabase(null, databaseName, "newName");//给数据库改名
env.removeDatabase(null, databaseName);//删除当前环境数据库

long deleteNum = env.truncateDatabase(null, databaseName, true);//清空数据库中所有记录,并返回数量
// JE requires the handle to be closed before truncation. Reopen it so
// this template remains usable after clearing the records.
com.sleepycat.je.DatabaseConfig config = myDatabase.getConfig();
myDatabase.close();
long deleteNum = env.truncateDatabase(null, databaseName, true);
myDatabase = env.openDatabase(null, databaseName, config);
System.out.println(deleteNum);


Expand Down
Loading
Loading