You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2024/03/15 17:40:35 UTC
(jena) 01/02: GH-2336: JUnit5
This is an automated email from the ASF dual-hosted git repository.
andy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/jena.git
commit fe057d169493aac6439b688de4b4d54f2185d760
Author: Andy Seaborne <an...@apache.org>
AuthorDate: Thu Mar 14 20:42:39 2024 +0000
GH-2336: JUnit5
---
jena-arq/pom.xml | 4 +-
jena-base/pom.xml | 12 ++---
jena-benchmarks/jena-benchmarks-jmh/pom.xml | 4 +-
jena-cmds/pom.xml | 4 +-
jena-core/pom.xml | 56 +++++++++++-----------
jena-db/jena-dboe-index-test/pom.xml | 28 ++++++-----
.../jena/dboe/index/testlib/AbstractTestIndex.java | 14 ++++--
jena-db/pom.xml | 4 +-
jena-examples/pom.xml | 4 +-
jena-extras/jena-commonsrdf/pom.xml | 4 +-
jena-extras/jena-querybuilder/pom.xml | 4 +-
jena-fuseki2/jena-fuseki-access/pom.xml | 4 +-
jena-fuseki2/jena-fuseki-core/pom.xml | 4 +-
jena-fuseki2/jena-fuseki-geosparql/pom.xml | 4 +-
jena-fuseki2/jena-fuseki-main/pom.xml | 4 +-
jena-fuseki2/jena-fuseki-webapp/pom.xml | 4 +-
jena-geosparql/pom.xml | 4 +-
jena-integration-tests/pom.xml | 4 +-
jena-iri/pom.xml | 4 +-
jena-permissions/pom.xml | 4 +-
jena-rdfconnection/pom.xml | 4 +-
jena-rdfpatch/pom.xml | 4 +-
jena-shacl/pom.xml | 4 +-
jena-shex/pom.xml | 4 +-
jena-tdb1/pom.xml | 4 +-
jena-tdb2/pom.xml | 4 +-
jena-text/pom.xml | 4 +-
pom.xml | 30 +++++++++++-
28 files changed, 134 insertions(+), 98 deletions(-)
diff --git a/jena-arq/pom.xml b/jena-arq/pom.xml
index 19160d4231..ee8f00d13d 100644
--- a/jena-arq/pom.xml
+++ b/jena-arq/pom.xml
@@ -117,8 +117,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-base/pom.xml b/jena-base/pom.xml
index 52d438ac31..af1af9c070 100644
--- a/jena-base/pom.xml
+++ b/jena-base/pom.xml
@@ -101,12 +101,12 @@
<groupId>com.github.andrewoma.dexx</groupId>
<artifactId>collection</artifactId>
</dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
+
+ <dependency>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.slf4j</groupId>
diff --git a/jena-benchmarks/jena-benchmarks-jmh/pom.xml b/jena-benchmarks/jena-benchmarks-jmh/pom.xml
index 2e0551f032..edae608677 100644
--- a/jena-benchmarks/jena-benchmarks-jmh/pom.xml
+++ b/jena-benchmarks/jena-benchmarks-jmh/pom.xml
@@ -94,8 +94,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-cmds/pom.xml b/jena-cmds/pom.xml
index 3a6b1b0c0a..47fda781f0 100644
--- a/jena-cmds/pom.xml
+++ b/jena-cmds/pom.xml
@@ -157,8 +157,8 @@
-->
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-core/pom.xml b/jena-core/pom.xml
index a2a58c3016..ace56aac24 100644
--- a/jena-core/pom.xml
+++ b/jena-core/pom.xml
@@ -53,43 +53,43 @@
</dependency>
<dependency>
- <groupId>org.apache.jena</groupId>
- <artifactId>jena-iri</artifactId>
- <version>5.0.0-SNAPSHOT</version>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-iri</artifactId>
+ <version>5.0.0-SNAPSHOT</version>
</dependency>
-
+
+ <dependency>
+ <artifactId>commons-cli</artifactId>
+ <groupId>commons-cli</groupId>
+ </dependency>
+
<dependency>
- <artifactId>commons-cli</artifactId>
- <groupId>commons-cli</groupId>
+ <groupId>org.roaringbitmap</groupId>
+ <artifactId>RoaringBitmap</artifactId>
</dependency>
<dependency>
- <groupId>org.roaringbitmap</groupId>
- <artifactId>RoaringBitmap</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
+ <groupId>org.xenei</groupId>
+ <artifactId>junit-contracts</artifactId>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>commons-cli</artifactId>
+ <groupId>commons-cli</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>commons-logging</artifactId>
+ <groupId>commons-logging</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
- <dependency>
- <groupId>org.xenei</groupId>
- <artifactId>junit-contracts</artifactId>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <artifactId>commons-cli</artifactId>
- <groupId>commons-cli</groupId>
- </exclusion>
- <exclusion>
- <artifactId>commons-logging</artifactId>
- <groupId>commons-logging</groupId>
- </exclusion>
- </exclusions>
- </dependency>
-
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
@@ -151,7 +151,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
- <include>org/apache/jena/test/TestPackage.java</include>
+ <include>org/apache/jena/test/TestPackage_core.java</include>
<include>**/*_CS.java</include>
</includes>
</configuration>
diff --git a/jena-db/jena-dboe-index-test/pom.xml b/jena-db/jena-dboe-index-test/pom.xml
index c03dee468c..5baaf0ad5f 100644
--- a/jena-db/jena-dboe-index-test/pom.xml
+++ b/jena-db/jena-dboe-index-test/pom.xml
@@ -44,22 +44,28 @@
</dependency>
<dependency>
- <!-- Bring junit into scope-compile -->
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
<scope>compile</scope>
</dependency>
-
- <!--
- Fix necessary for java11 (not java17)
- when building javadoc.
+
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-suite</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
<dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest</artifactId>
- <version>[2.1,)</version>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
<scope>compile</scope>
</dependency>
- -->
</dependencies>
diff --git a/jena-db/jena-dboe-index-test/src/main/java/org/apache/jena/dboe/index/testlib/AbstractTestIndex.java b/jena-db/jena-dboe-index-test/src/main/java/org/apache/jena/dboe/index/testlib/AbstractTestIndex.java
index 880ed1e995..2f965cbeaf 100644
--- a/jena-db/jena-dboe-index-test/src/main/java/org/apache/jena/dboe/index/testlib/AbstractTestIndex.java
+++ b/jena-db/jena-dboe-index-test/src/main/java/org/apache/jena/dboe/index/testlib/AbstractTestIndex.java
@@ -18,19 +18,23 @@
package org.apache.jena.dboe.index.testlib;
-import static org.apache.jena.dboe.index.testlib.IndexTestLib.*;
+import static org.apache.jena.dboe.index.testlib.IndexTestLib.testDelete;
+import static org.apache.jena.dboe.index.testlib.IndexTestLib.testIndexContents;
+import static org.apache.jena.dboe.index.testlib.IndexTestLib.testInsert;
import static org.apache.jena.dboe.test.RecordLib.intToRecord;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
import org.apache.jena.dboe.base.record.Record;
import org.apache.jena.dboe.index.Index;
import org.apache.jena.dboe.test.RecordLib;
-import org.junit.Assert;
-import org.junit.After;
-import org.junit.Test;
+import org.junit.After ;
+import org.junit.Test ;
//import org.apache.jena.tdb.base.record.RecordLib;
-public abstract class AbstractTestIndex extends Assert
+public abstract class AbstractTestIndex
{
Index index = null;
diff --git a/jena-db/pom.xml b/jena-db/pom.xml
index ef25ba0e33..01947ebe2a 100644
--- a/jena-db/pom.xml
+++ b/jena-db/pom.xml
@@ -51,8 +51,8 @@
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-examples/pom.xml b/jena-examples/pom.xml
index f7273c79ec..33267a846d 100644
--- a/jena-examples/pom.xml
+++ b/jena-examples/pom.xml
@@ -62,8 +62,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
diff --git a/jena-extras/jena-commonsrdf/pom.xml b/jena-extras/jena-commonsrdf/pom.xml
index 6c20e4582d..b6493f4dda 100644
--- a/jena-extras/jena-commonsrdf/pom.xml
+++ b/jena-extras/jena-commonsrdf/pom.xml
@@ -68,8 +68,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-extras/jena-querybuilder/pom.xml b/jena-extras/jena-querybuilder/pom.xml
index 81bb18540b..e7e66a0dc9 100644
--- a/jena-extras/jena-querybuilder/pom.xml
+++ b/jena-extras/jena-querybuilder/pom.xml
@@ -70,8 +70,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-fuseki2/jena-fuseki-access/pom.xml b/jena-fuseki2/jena-fuseki-access/pom.xml
index 696533756a..886ed05cb4 100644
--- a/jena-fuseki2/jena-fuseki-access/pom.xml
+++ b/jena-fuseki2/jena-fuseki-access/pom.xml
@@ -42,8 +42,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-fuseki2/jena-fuseki-core/pom.xml b/jena-fuseki2/jena-fuseki-core/pom.xml
index 0d6a391c3e..285c4573b7 100644
--- a/jena-fuseki2/jena-fuseki-core/pom.xml
+++ b/jena-fuseki2/jena-fuseki-core/pom.xml
@@ -104,8 +104,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-fuseki2/jena-fuseki-geosparql/pom.xml b/jena-fuseki2/jena-fuseki-geosparql/pom.xml
index cc10c8ff2c..fd26d54ad5 100644
--- a/jena-fuseki2/jena-fuseki-geosparql/pom.xml
+++ b/jena-fuseki2/jena-fuseki-geosparql/pom.xml
@@ -105,8 +105,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-fuseki2/jena-fuseki-main/pom.xml b/jena-fuseki2/jena-fuseki-main/pom.xml
index 9b119085d5..53f70bfe2e 100644
--- a/jena-fuseki2/jena-fuseki-main/pom.xml
+++ b/jena-fuseki2/jena-fuseki-main/pom.xml
@@ -69,8 +69,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-fuseki2/jena-fuseki-webapp/pom.xml b/jena-fuseki2/jena-fuseki-webapp/pom.xml
index eed02596c4..e23125b7f3 100644
--- a/jena-fuseki2/jena-fuseki-webapp/pom.xml
+++ b/jena-fuseki2/jena-fuseki-webapp/pom.xml
@@ -130,8 +130,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-geosparql/pom.xml b/jena-geosparql/pom.xml
index e7cecf14ad..03a96d8ee3 100644
--- a/jena-geosparql/pom.xml
+++ b/jena-geosparql/pom.xml
@@ -92,8 +92,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-integration-tests/pom.xml b/jena-integration-tests/pom.xml
index c05b8d7773..497767818d 100644
--- a/jena-integration-tests/pom.xml
+++ b/jena-integration-tests/pom.xml
@@ -150,8 +150,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-iri/pom.xml b/jena-iri/pom.xml
index 362a6f5680..14d100b4c3 100644
--- a/jena-iri/pom.xml
+++ b/jena-iri/pom.xml
@@ -41,8 +41,8 @@
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-permissions/pom.xml b/jena-permissions/pom.xml
index b0d672a7e9..f6bacb615a 100644
--- a/jena-permissions/pom.xml
+++ b/jena-permissions/pom.xml
@@ -198,8 +198,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
</dependency>
<dependency>
diff --git a/jena-rdfconnection/pom.xml b/jena-rdfconnection/pom.xml
index 25d5563b49..d644f4b9ee 100644
--- a/jena-rdfconnection/pom.xml
+++ b/jena-rdfconnection/pom.xml
@@ -79,8 +79,8 @@
<!-- Tests is also done in jena-integration-tests -->
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-rdfpatch/pom.xml b/jena-rdfpatch/pom.xml
index 6addf1b2fd..7389b2123b 100644
--- a/jena-rdfpatch/pom.xml
+++ b/jena-rdfpatch/pom.xml
@@ -48,8 +48,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/jena-shacl/pom.xml b/jena-shacl/pom.xml
index 6001c5f4cf..09121730af 100644
--- a/jena-shacl/pom.xml
+++ b/jena-shacl/pom.xml
@@ -52,8 +52,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-shex/pom.xml b/jena-shex/pom.xml
index e017bc9bfa..c4d88fd9b3 100644
--- a/jena-shex/pom.xml
+++ b/jena-shex/pom.xml
@@ -53,8 +53,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-tdb1/pom.xml b/jena-tdb1/pom.xml
index 48fd728dfd..57d2078a51 100644
--- a/jena-tdb1/pom.xml
+++ b/jena-tdb1/pom.xml
@@ -69,8 +69,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-tdb2/pom.xml b/jena-tdb2/pom.xml
index 961c1ef751..5748b0a249 100644
--- a/jena-tdb2/pom.xml
+++ b/jena-tdb2/pom.xml
@@ -62,8 +62,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/jena-text/pom.xml b/jena-text/pom.xml
index 8ce54eb5cb..bd3947cc44 100644
--- a/jena-text/pom.xml
+++ b/jena-text/pom.xml
@@ -95,8 +95,8 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
diff --git a/pom.xml b/pom.xml
index 87c77864f1..fef42608f1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -93,7 +93,10 @@
<ver.roaringbitmap>1.0.5</ver.roaringbitmap>
<!-- Testing -->
- <ver.junit>4.13.2</ver.junit>
+ <ver.junit4>4.13.2</ver.junit4>
+ <ver.junit5>5.10.2</ver.junit5>
+ <ver.junit5-platform>1.10.2</ver.junit5-platform>
+
<ver.mockito>5.11.0</ver.mockito>
<ver.awaitility>4.2.0</ver.awaitility>
<ver.contract.tests>0.2.0</ver.contract.tests>
@@ -286,10 +289,33 @@
<dependencyManagement>
<dependencies>
+
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${ver.junit5}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-suite</artifactId>
+ <version>${ver.junit5-platform}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- Includes JUnit 4 : Needed for older testing code. -->
+ <dependency>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
+ <version>${ver.junit5}</version>
+ <scope>test</scope>
+ </dependency>
+
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>${ver.junit}</version>
+ <version>${ver.junit4}</version>
<scope>test</scope>
</dependency>