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

Upgrade to JUnit 4.13.1 #23876

Closed
wilkinsona opened this issue Oct 26, 2020 · 5 comments
Closed

Upgrade to JUnit 4.13.1 #23876

wilkinsona opened this issue Oct 26, 2020 · 5 comments
Assignees
Labels
type: dependency-upgrade A dependency upgrade
Milestone

Comments

@wilkinsona
Copy link
Member

No description provided.

@wilkinsona wilkinsona added the type: dependency-upgrade A dependency upgrade label Oct 26, 2020
@wilkinsona wilkinsona added this to the 2.3.5 milestone Oct 26, 2020
@wilkinsona
Copy link
Member Author

wilkinsona commented Oct 26, 2020

This is blocked at the moment as JUnit Jupiter 5.6.2 cannot parse 4.13.1, failing with the following:

Exception in thread "main" 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)

The parsing has been made more lenient in JUnit Jupiter 5.7 (junit-team/junit5#2198) but that doesn't help us as our maintenance policy means that we cannot upgrade to a minor version of JUnit Jupiter in a maintenance release of Spring Boot. IMO, it shouldn't be necessary for anyone to move to a new minor of JUnit Jupiter to use a new maintenance release of JUnit. I've reached out to @sbrannen to ask the JUnit team to consider a 5.6.3 release that can be used with JUnit 4.13.1.

@wilkinsona wilkinsona added the status: blocked An issue that's blocked on an external project change label Oct 26, 2020
@marcphilipp
Copy link

@wilkinsona 5.6.3 has now been released so this issue should no longer be blocked.

@snicoll snicoll removed the status: blocked An issue that's blocked on an external project change label Oct 27, 2020
@snicoll
Copy link
Member

snicoll commented Oct 27, 2020

Thank you for the quick turnaround @marcphilipp

@hameno
Copy link

hameno commented Jan 26, 2021

I'm still seeing the old version 5.6.2 in 2.3.8.RELEASE:
output of mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:tree

[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.3.8.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test:jar:2.3.8.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.3.8.RELEASE:test
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] |  |  \- net.minidev:json-smart:jar:2.3:test
[INFO] |  |     \- net.minidev:accessors-smart:jar:1.2:test
[INFO] |  |        \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] |  +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
[INFO] |  |  \- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile
[INFO] |  +- org.assertj:assertj-core:jar:3.16.1:test
[INFO] |  +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] |  +- org.junit.jupiter:junit-jupiter:jar:5.6.2:test
[INFO] |  |  +- org.junit.jupiter:junit-jupiter-api:jar:5.6.2:test
[INFO] |  |  |  +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] |  |  |  \- org.junit.platform:junit-platform-commons:jar:1.6.2:test
[INFO] |  |  +- org.junit.jupiter:junit-jupiter-params:jar:5.6.2:test
[INFO] |  |  \- org.junit.jupiter:junit-jupiter-engine:jar:5.6.2:test
[INFO] |  +- org.junit.vintage:junit-vintage-engine:jar:5.6.2:test
[INFO] |  |  +- org.apiguardian:apiguardian-api:jar:1.1.0:test
[INFO] |  |  \- org.junit.platform:junit-platform-engine:jar:1.6.2:test
[INFO] |  +- org.mockito:mockito-core:jar:3.3.3:test
[INFO] |  |  +- net.bytebuddy:byte-buddy-agent:jar:1.10.19:test
[INFO] |  |  \- org.objenesis:objenesis:jar:2.6:test
[INFO] |  +- org.mockito:mockito-junit-jupiter:jar:3.3.3:test
[INFO] |  +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] |  +- org.springframework:spring-core:jar:5.2.8.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.2.8.RELEASE:compile
[INFO] |  +- org.springframework:spring-test:jar:5.2.8.RELEASE:test
[INFO] |  \- org.xmlunit:xmlunit-core:jar:2.7.0:test

@wilkinsona
Copy link
Member Author

@hameno This issue is for an upgrade to JUnit 4 4.13.1. The upgrade to 5.6.3 was done in #23915 which was included in 2.3.5.

Here's the output of ./mvnw dependency:tree from an app using 2.3.8 generated using start.spring.io:

[INFO] \- org.springframework.boot:spring-boot-starter-test:jar:2.3.8.RELEASE:test
[INFO]    +- org.springframework.boot:spring-boot-test:jar:2.3.8.RELEASE:test
[INFO]    +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.3.8.RELEASE:test
[INFO]    +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO]    |  +- net.minidev:json-smart:jar:2.3:test
[INFO]    |  |  \- net.minidev:accessors-smart:jar:1.2:test
[INFO]    |  |     \- org.ow2.asm:asm:jar:5.0.4:test
[INFO]    |  \- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO]    +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:test
[INFO]    |  \- jakarta.activation:jakarta.activation-api:jar:1.2.2:test
[INFO]    +- org.assertj:assertj-core:jar:3.16.1:test
[INFO]    +- org.hamcrest:hamcrest:jar:2.2:test
[INFO]    +- org.junit.jupiter:junit-jupiter:jar:5.6.3:test
[INFO]    |  +- org.junit.jupiter:junit-jupiter-api:jar:5.6.3:test
[INFO]    |  |  +- org.apiguardian:apiguardian-api:jar:1.1.0:test
[INFO]    |  |  +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO]    |  |  \- org.junit.platform:junit-platform-commons:jar:1.6.3:test
[INFO]    |  +- org.junit.jupiter:junit-jupiter-params:jar:5.6.3:test
[INFO]    |  \- org.junit.jupiter:junit-jupiter-engine:jar:5.6.3:test
[INFO]    |     \- org.junit.platform:junit-platform-engine:jar:1.6.3:test
[INFO]    +- org.mockito:mockito-core:jar:3.3.3:test
[INFO]    |  +- net.bytebuddy:byte-buddy:jar:1.10.19:test
[INFO]    |  +- net.bytebuddy:byte-buddy-agent:jar:1.10.19:test
[INFO]    |  \- org.objenesis:objenesis:jar:2.6:test
[INFO]    +- org.mockito:mockito-junit-jupiter:jar:3.3.3:test
[INFO]    +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO]    |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO]    +- org.springframework:spring-test:jar:5.2.12.RELEASE:test
[INFO]    \- org.xmlunit:xmlunit-core:jar:2.7.0:test

As you can see 5.6.3 is used as expected. Without knowing more about your build I can't see why your are getting 5.6.2. If you'd like some help figuring that out, please follow up on Stack Overflow or Gitter. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: dependency-upgrade A dependency upgrade
Projects
None yet
Development

No branches or pull requests

4 participants