Skip to content
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

Junit 4.13.1 version can't be parsed by JUnit4VersionCheck #2529

Closed
david-m-s opened this issue Jan 14, 2021 · 3 comments
Closed

Junit 4.13.1 version can't be parsed by JUnit4VersionCheck #2529

david-m-s opened this issue Jan 14, 2021 · 3 comments

Comments

@david-m-s
Copy link

Using cucumber 6.9.1 which brings junit 4.13.1 and junit-vintage-engine 5.7.0 at some point there is a check for junit version and the JUnit4VersionCheck class can't handle x.y.z format, just x.y

I'm having this exception:

Caused by: org.junit.platform.commons.JUnitException: Failed to parse version of junit:junit: 4.13.1
at org.junit.vintage.engine.JUnit4VersionCheck.parseVersion(JUnit4VersionCheck.java:54)
at org.junit.vintage.engine.JUnit4VersionCheck.checkSupported(JUnit4VersionCheck.java:37)
at org.junit.vintage.engine.JUnit4VersionCheck.checkSupported(JUnit4VersionCheck.java:32)
at org.junit.vintage.engine.VintageTestEngine.discover(VintageTestEngine.java:62)
at org.junit.platform.launcher.core.DefaultLauncher.discoverEngineRoot(DefaultLauncher.java:181)

@marcphilipp
Copy link
Member

That was fixed in #2198 for 5.6.3 and 5.7.0. Are you sure you're using junit-vintage-engine 5.7.0?

@david-m-s
Copy link
Author

True, sorry I see it's actually 5.6.2. Closing.

@marcphilipp
Copy link
Member

No worries, thanks for reporting back! 👍

richard-timpson pushed a commit to richard-timpson/kork that referenced this issue May 3, 2023
Along with it upgrade org.junit:junit-bom to 5.6.3. due to this:
spring boot 2.2.13 uses groovy version 2.5.14, that upgrades org.codehaus.groovy:groovy-test from 2.5.11 (constrained in spinnaker-dependencies) to 2.5.14 and upgrades junit:junit from 4.13 to 4.13.1.
In kork, org.junit:junit-bom is constrained to 5.6.2, having bug as junit-vintage-engine:5.6.2 does not parse junit version of format x.y.z, just parse x.y.
This bug is fixed in 5.6.3 and 5.7.0.
junit-team/junit5#2529
junit-team/junit5#2198
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants