Skip to content

Unsupported or missing version of JUnit 4 should fail the build #1944

Closed
@nielsbasjes

Description

@nielsbasjes

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:

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
Jul 02, 2019 11:42:33 PM org.junit.platform.launcher.core.DefaultLauncher handleThrowable
WARNING: TestEngine with ID 'junit-vintage' failed to discover tests
org.junit.platform.commons.JUnitException: Unsupported version of junit:junit: 4.11. Please upgrade to version 4.12 or later.
	at org.junit.vintage.engine.JUnit4VersionCheck.checkSupported(JUnit4VersionCheck.java:39)
	at org.junit.vintage.engine.JUnit4VersionCheck.checkSupported(JUnit4VersionCheck.java:32)
	at org.junit.vintage.engine.VintageTestEngine.discover(VintageTestEngine.java:61)

and later on

[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions