You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by GitBox <gi...@apache.org> on 2022/09/13 11:01:00 UTC
[GitHub] [avro] martin-g opened a new pull request, #1863: AVRO-3628: [Java] JUnit 4.x tests are not executed
martin-g opened a new pull request, #1863:
URL: https://github.com/apache/avro/pull/1863
Use JUnit 5.x Vintage engine instead of JUnit 4.x
## What is the purpose of the change
* Fix the execution of JUnit 4.x unit tests by using JUnit 5.x Vintage engine. Fixes AVRO-3628
## Verifying this change
Check the stdout of the Maven build and make sure that JUnit 4.x tests are executed, e.g. avro-maven-plugin module should execute 11 tests.
## Documentation
- Does this pull request introduce a new feature? no
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [avro] martin-g commented on a diff in pull request #1863: AVRO-3628: [Java] JUnit 4.x tests are not executed
Posted by GitBox <gi...@apache.org>.
martin-g commented on code in PR #1863:
URL: https://github.com/apache/avro/pull/1863#discussion_r970427555
##########
lang/java/archetypes/avro-service-archetype/src/main/pom/pom.xml:
##########
@@ -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>
Review Comment:
Done with https://github.com/apache/avro/pull/1863/commits/65c3ac3354fceaaa6aaa2e81bf54475b1541b2b1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [avro] martin-g commented on pull request #1863: AVRO-3628: [Java] JUnit 4.x tests are not executed
Posted by GitBox <gi...@apache.org>.
martin-g commented on PR #1863:
URL: https://github.com/apache/avro/pull/1863#issuecomment-1246305589
> Just for info -- adding up the test cases before the change: **144** versus **10504** after the change scream
Yup, the CI will become slower again :-)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [avro] RyanSkraba commented on pull request #1863: AVRO-3628: [Java] JUnit 4.x tests are not executed
Posted by GitBox <gi...@apache.org>.
RyanSkraba commented on PR #1863:
URL: https://github.com/apache/avro/pull/1863#issuecomment-1245815279
Just for info -- adding up the test cases before the change: **144** versus **10504** after the change :scream:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [avro] martin-g commented on a diff in pull request #1863: AVRO-3628: [Java] JUnit 4.x tests are not executed
Posted by GitBox <gi...@apache.org>.
martin-g commented on code in PR #1863:
URL: https://github.com/apache/avro/pull/1863#discussion_r970370194
##########
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>
Review Comment:
At least Intellij IDEA suggests so. It shows `../` as a warning.
I'm OK to revert it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [avro] martin-g commented on a diff in pull request #1863: AVRO-3628: [Java] JUnit 4.x tests are not executed
Posted by GitBox <gi...@apache.org>.
martin-g commented on code in PR #1863:
URL: https://github.com/apache/avro/pull/1863#discussion_r969477369
##########
lang/java/maven-plugin/pom.xml:
##########
@@ -60,6 +60,7 @@
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${maven-core.version}</version>
+ <scope>provided</scope>
Review Comment:
This fixes the following Maven error:
```
[INFO] --- maven-plugin-plugin:3.6.4:helpmojo (generated-helpmojo) @ avro-maven-plugin ---
[ERROR]
Some dependencies of Maven Plugins are expected to be in provided scope.
Please make sure that dependencies listed below declared in POM
have set '<scope>provided</scope>' as well.
The following dependencies are in wrong scope:
* org.apache.maven:maven-core:jar:3.3.9:compile
* org.apache.maven:maven-model:jar:3.3.9:compile
* org.apache.maven:maven-settings:jar:3.3.9:compile
* org.apache.maven:maven-settings-builder:jar:3.3.9:compile
* org.apache.maven:maven-builder-support:jar:3.3.9:compile
* org.apache.maven:maven-repository-metadata:jar:3.3.9:compile
* org.apache.maven:maven-artifact:jar:3.3.9:compile
* org.apache.maven:maven-plugin-api:jar:3.3.9:compile
* org.apache.maven:maven-model-builder:jar:3.3.9:compile
* org.apache.maven:maven-aether-provider:jar:3.3.9:compile
```
##########
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>
Review Comment:
It seems something is wrong with the release process. Several pom.xml files were still pointing to the old 1.11.0-SNAPSHOT parent.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [avro] RyanSkraba commented on a diff in pull request #1863: AVRO-3628: [Java] JUnit 4.x tests are not executed
Posted by GitBox <gi...@apache.org>.
RyanSkraba commented on code in PR #1863:
URL: https://github.com/apache/avro/pull/1863#discussion_r969952345
##########
lang/java/archetypes/avro-service-archetype/src/main/pom/pom.xml:
##########
@@ -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>
Review Comment:
Oh, my mistake, I see -- yes, this archetype can probably be safely left as it is (on JUnit4) or entirely migrate the generated test to [JUnit5](https://github.com/apache/avro/blob/70260919426f89825ca148f5ee815f3b2cf4764d/lang/java/archetypes/avro-service-archetype/src/main/resources/archetype-resources/src/test/java/integration/SimpleOrderServiceIntegrationTest.java#L33-L35)
Lets not mix JUnit4 and JUnit5 in the archetype, however!
##########
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>
Review Comment:
Just for info, is this a best practice?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [avro] RyanSkraba merged pull request #1863: AVRO-3628: [Java] JUnit 4.x tests are not executed
Posted by GitBox <gi...@apache.org>.
RyanSkraba merged PR #1863:
URL: https://github.com/apache/avro/pull/1863
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [avro] RyanSkraba commented on a diff in pull request #1863: AVRO-3628: [Java] JUnit 4.x tests are not executed
Posted by GitBox <gi...@apache.org>.
RyanSkraba commented on code in PR #1863:
URL: https://github.com/apache/avro/pull/1863#discussion_r969837975
##########
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>
Review Comment:
Good catch, this should have been done in https://cwiki.apache.org/confluence/display/AVRO/How+To+Release#HowToRelease-Branching (Step 2c)!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [avro] RyanSkraba commented on a diff in pull request #1863: AVRO-3628: [Java] JUnit 4.x tests are not executed
Posted by GitBox <gi...@apache.org>.
RyanSkraba commented on code in PR #1863:
URL: https://github.com/apache/avro/pull/1863#discussion_r969945995
##########
lang/java/archetypes/avro-service-archetype/src/main/pom/pom.xml:
##########
@@ -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>
Review Comment:
Huh -- as far as I remember @opwvhk is correct, and yet JUnit5 tests [are being run](https://github.com/apache/avro/actions/runs/3044499132/jobs/4904953694#step:7:404)! (TestDataFile is definitely a JUnit5 migrated class).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [avro] opwvhk commented on a diff in pull request #1863: AVRO-3628: [Java] JUnit 4.x tests are not executed
Posted by GitBox <gi...@apache.org>.
opwvhk commented on code in PR #1863:
URL: https://github.com/apache/avro/pull/1863#discussion_r969746571
##########
lang/java/archetypes/avro-service-archetype/src/main/pom/pom.xml:
##########
@@ -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>
Review Comment:
This looks like it (only) uses the vintage engine. Do we also want to run JUnit5 (Jupiter) tests?
In that case, we also need to add the Jupiter engine IIRC.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [avro] martin-g commented on a diff in pull request #1863: AVRO-3628: [Java] JUnit 4.x tests are not executed
Posted by GitBox <gi...@apache.org>.
martin-g commented on code in PR #1863:
URL: https://github.com/apache/avro/pull/1863#discussion_r970368653
##########
lang/java/archetypes/avro-service-archetype/src/main/pom/pom.xml:
##########
@@ -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>
Review Comment:
Good catch! I will migrate the archetype to JUnit 5.x!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org