You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2022/09/13 10:58:07 UTC
[avro] 01/01: AVRO-3628: [Java] JUnit 4.x tests are not executed
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch avro-3628-junit-5.x-vintage
in repository https://gitbox.apache.org/repos/asf/avro.git
commit d793071a97eab1604911024d42197fa81a6d0bb1
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Tue Sep 13 13:57:21 2022 +0300
AVRO-3628: [Java] JUnit 4.x tests are not executed
Use JUnit 5.x Vintage engine instead of JUnit 4.x
Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
.../archetypes/avro-service-archetype/src/main/pom/pom.xml | 8 ++++----
lang/java/maven-plugin/pom.xml | 3 ++-
.../test/resources/unit/idl/pom-injecting-velocity-tools.xml | 2 +-
lang/java/maven-plugin/src/test/resources/unit/idl/pom.xml | 2 +-
.../resources/unit/protocol/pom-injecting-velocity-tools.xml | 2 +-
.../java/maven-plugin/src/test/resources/unit/protocol/pom.xml | 2 +-
lang/java/maven-plugin/src/test/resources/unit/schema/pom.xml | 2 +-
lang/java/pom.xml | 10 +++++-----
8 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/lang/java/archetypes/avro-service-archetype/src/main/pom/pom.xml b/lang/java/archetypes/avro-service-archetype/src/main/pom/pom.xml
index 20455fa77..2179e015c 100644
--- a/lang/java/archetypes/avro-service-archetype/src/main/pom/pom.xml
+++ b/lang/java/archetypes/avro-service-archetype/src/main/pom/pom.xml
@@ -35,7 +35,7 @@
<properties>
<avro.version>${project.version}</avro.version>
<jackson-bom.version>${jackson-bom.version}</jackson-bom.version>
- <junit.version>${junit.version}</junit.version>
+ <junit5.version>${junit5.version}</junit5.version>
<logback.version>1.2.3</logback.version>
<slf4j.version>${slf4j.version}</slf4j.version>
</properties>
@@ -79,9 +79,9 @@
<version>\${logback.version}</version>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>\${junit.version}</version>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
+ <version>\${junit5.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/lang/java/maven-plugin/pom.xml b/lang/java/maven-plugin/pom.xml
index 78b65ff78..64f9e1f39 100644
--- a/lang/java/maven-plugin/pom.xml
+++ b/lang/java/maven-plugin/pom.xml
@@ -24,7 +24,7 @@
<artifactId>avro-parent</artifactId>
<groupId>org.apache.avro</groupId>
<version>1.12.0-SNAPSHOT</version>
- <relativePath>../</relativePath>
+ <relativePath>../pom.xml</relativePath>
</parent>
<artifactId>avro-maven-plugin</artifactId>
@@ -60,6 +60,7 @@
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${maven-core.version}</version>
+ <scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.google.code.findbugs</groupId>
diff --git a/lang/java/maven-plugin/src/test/resources/unit/idl/pom-injecting-velocity-tools.xml b/lang/java/maven-plugin/src/test/resources/unit/idl/pom-injecting-velocity-tools.xml
index fe7d7ab7e..297dd6a1c 100644
--- a/lang/java/maven-plugin/src/test/resources/unit/idl/pom-injecting-velocity-tools.xml
+++ b/lang/java/maven-plugin/src/test/resources/unit/idl/pom-injecting-velocity-tools.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>avro-parent</artifactId>
<groupId>org.apache.avro</groupId>
- <version>1.11.0-SNAPSHOT</version>
+ <version>1.12.0-SNAPSHOT</version>
<relativePath>../../../../../../../../../</relativePath>
</parent>
diff --git a/lang/java/maven-plugin/src/test/resources/unit/idl/pom.xml b/lang/java/maven-plugin/src/test/resources/unit/idl/pom.xml
index a2d3348d3..725a6480e 100644
--- a/lang/java/maven-plugin/src/test/resources/unit/idl/pom.xml
+++ b/lang/java/maven-plugin/src/test/resources/unit/idl/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>avro-parent</artifactId>
<groupId>org.apache.avro</groupId>
- <version>1.11.0-SNAPSHOT</version>
+ <version>1.12.0-SNAPSHOT</version>
<relativePath>../../../../../../../../../pom.xml</relativePath>
</parent>
diff --git a/lang/java/maven-plugin/src/test/resources/unit/protocol/pom-injecting-velocity-tools.xml b/lang/java/maven-plugin/src/test/resources/unit/protocol/pom-injecting-velocity-tools.xml
index 6efefa9ee..eb1e6a87b 100644
--- a/lang/java/maven-plugin/src/test/resources/unit/protocol/pom-injecting-velocity-tools.xml
+++ b/lang/java/maven-plugin/src/test/resources/unit/protocol/pom-injecting-velocity-tools.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>avro-parent</artifactId>
<groupId>org.apache.avro</groupId>
- <version>1.11.0-SNAPSHOT</version>
+ <version>1.12.0-SNAPSHOT</version>
<relativePath>../../../../../../../../../</relativePath>
</parent>
diff --git a/lang/java/maven-plugin/src/test/resources/unit/protocol/pom.xml b/lang/java/maven-plugin/src/test/resources/unit/protocol/pom.xml
index d3a90ba33..8391e33e0 100644
--- a/lang/java/maven-plugin/src/test/resources/unit/protocol/pom.xml
+++ b/lang/java/maven-plugin/src/test/resources/unit/protocol/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>avro-parent</artifactId>
<groupId>org.apache.avro</groupId>
- <version>1.11.0-SNAPSHOT</version>
+ <version>1.12.0-SNAPSHOT</version>
<relativePath>../../../../../../../../../pom.xml</relativePath>
</parent>
diff --git a/lang/java/maven-plugin/src/test/resources/unit/schema/pom.xml b/lang/java/maven-plugin/src/test/resources/unit/schema/pom.xml
index 9d942494e..dc93f578b 100644
--- a/lang/java/maven-plugin/src/test/resources/unit/schema/pom.xml
+++ b/lang/java/maven-plugin/src/test/resources/unit/schema/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>avro-parent</artifactId>
<groupId>org.apache.avro</groupId>
- <version>1.11.0-SNAPSHOT</version>
+ <version>1.12.0-SNAPSHOT</version>
<relativePath>../../../../../../../../../pom.xml</relativePath>
</parent>
diff --git a/lang/java/pom.xml b/lang/java/pom.xml
index 798a177ee..16e7e4855 100644
--- a/lang/java/pom.xml
+++ b/lang/java/pom.xml
@@ -42,7 +42,6 @@
<servlet-api.version>4.0.1</servlet-api.version>
<jetty.version>9.4.48.v20220622</jetty.version>
<jopt-simple.version>5.0.4</jopt-simple.version>
- <junit.version>4.13.2</junit.version>
<junit5.version>5.9.0</junit5.version>
<netty.version>4.1.81.Final</netty.version>
<protobuf.version>3.21.5</protobuf.version>
@@ -157,13 +156,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
+ <version>3.0.0-M7</version>
<configuration>
<includes>
<!-- Avro naming convention for JUnit tests -->
<include>**/Test**</include>
</includes>
<excludes>
- <!-- A few innner classes are not to be tested -->
+ <!-- A few inner classes are not to be tested -->
<exclude>**/*$*</exclude>
<!-- exclude the generated classes under apache.avro.test, some of
these match **/Test** and are not JUnit tests -->
@@ -592,9 +592,9 @@
will inherit these dependencies directly, and can opt out if necessary with <excludes> -->
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
+ <version>${junit5.version}</version>
<scope>test</scope>
</dependency>
<dependency>