Skip to content

Commit 9f74352

Browse files
committed
GitHub Actions to use Verifier for OS/JVM test matrix
The Verifier is designed to test the accuracy of LMDB storage and is therefore a useful test to perform on each target platform. It is noted that other GitHub Actions execute a full Maven verification.
1 parent be7359a commit 9f74352

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.github/workflows/maven.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build:
11-
name: Java 11 Build and Verify
11+
name: Latest Java LTS Build and Verify
1212
runs-on: ubuntu-latest
1313

1414
steps:
@@ -48,8 +48,8 @@ jobs:
4848
java-version: ${{ matrix.java }}
4949
cache: maven
5050

51-
- name: Test with Maven
52-
run: mvn -B test
51+
- name: Execute verifier
52+
run: mvn -B test -Dtest=VerifierTest -DverificationSeconds=10
5353

5454
- name: Upload Surefire reports on test failure
5555
uses: actions/upload-artifact@v3

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@
229229
<artifactId>maven-surefire-plugin</artifactId>
230230
<configuration>
231231
<argLine>--add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED</argLine>
232-
<forkCount>1</forkCount>
233-
<reuseForks>false</reuseForks>
232+
<forkCount>1</forkCount>
233+
<reuseForks>false</reuseForks>
234234
</configuration>
235235
</plugin>
236236
</plugins>

src/test/java/org/lmdbjava/VerifierTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ public void verification() throws IOException {
5252
.setMapSize(MEBIBYTES.toBytes(10))
5353
.open(path, MDB_NOSUBDIR)) {
5454
final Verifier v = new Verifier(env);
55-
assertThat(v.runFor(2, TimeUnit.SECONDS), greaterThan(1L));
55+
final int seconds = Integer.getInteger("verificationSeconds", 2);
56+
assertThat(v.runFor(seconds, TimeUnit.SECONDS), greaterThan(1L));
5657
}
5758
}
5859

0 commit comments

Comments
 (0)