-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsupported or missing version of JUnit 4 should fail the build #1944
Comments
Tentatively slated for 5.6 M1 for team discussion |
Related to #242. |
Team Decision: We agree that this should fail during test execution. 🙂 |
I updated the title to point out that a missing JUnit 4 artifact should also fail the build for use cases where someone excluded JUnit 4 from the classpath but left The logic in |
This was fixed in #1909. @nielsbasjes Would you care to verify using the latest snapshot? |
The problem has not been fixed in junit-vintage-engine-5.6.0-20190924.094617-81.jar. I get
then
and
To facilitate you guys repeating what I have I created a testing branch on my project I have the sonatype snapshot repo enabled using my ~/.m2/settings.xml To limit the time needed to reproduce this (some of my tests take a while) do:
verify I actually use the right version in the pom.xml
then
verify the actual dependency versions for this module
then
I see this (which says BUILD SUCCESS):
|
@nielsbasjes Thanks for testing! Must be Surefire swallowing the error. I'll take a closer look myself. |
Just by looking at the messages it seems the JUnitException is classified as a WARNING. And a warning should not fail the build... |
@nielsbasjes We still log this as a warning when Surefire calls |
@nielsbasjes The missing piece was that Surefire bundles an old version of I've created #2028 to ensure Surefire and other build tools and IDEs upgrade their bundled Launcher once 5.6 is released. |
@marcphilipp Thanks. I've check it and when I make my maven look like this
it correctly fails with
Thanks for fixing this. |
@nielsbasjes Thanks for double-checking! 👍 |
I had this problem when using junit 4.8.2 and then changing it to 4.13 worked (see doc). I am just commenting it here so as to validate my understanding that vintage engine requires junit 4.13 and not older to be able to detect tests. Please correct me if I am wrong. |
JUnit Vintage requires JUnit 4.12 or higher. |
I directly used 4.13 so would have missed that. Thanks for clearing it out. |
I'm using junit and vintage from the bom 5.5.0 in a Maven based project.
https://github.com/nielsbasjes/yauaa
In this project I have created a udf for Apache Pig.
In the pig dependency for this udf I also get junit 4.11.
The consequence of this older version of junit is that I get this perfectly fine stack trace during my build:
and later on
The bug I'm reporting is that I think this is should be a fatal error and not just a warning.
None of the tests I have ran and the ONLY reason I noticed this is because I saw a sudden drop in the code coverage of the tests.
So if this problem happens then please fail the build.
The text was updated successfully, but these errors were encountered: