Skip to content

Upgrade to Hamcrest 2.1 #15555

Closed
Closed
@ankurpathak

Description

@ankurpathak

Spring Boot Starter Test still uses old Hamcrest 1.3. Now Hamcrest 2.1 released after 3 years and have many new matchers, so it make sense to use it in Spring Boot Starter Test, Please check this url
for more details:
hamcrest/JavaHamcrest#224

Activity

changed the title [-]Add Support For Hamcrest 2.1 in Spring Boot Starter Test[/-] [+]Upgrade to hamcrest 2.1[/+] on Dec 24, 2018
wilkinsona

wilkinsona commented on Jan 10, 2019

@wilkinsona
Member

so it make sense to use it in Spring Boot Starter Test

Thanks for the suggestion, but I'm not sure that it makes sense, at least not without considering other dependencies.

JUnit 4.12 depends on Hamcrest 1.3. We'd either need to be certain that it is compatible with 2.1 or consider the Hamcrest upgrade alongside a switch to JUnit 5 (version 5 dropped JUnit's Hamcrest dependency).

wilkinsona

wilkinsona commented on Jan 10, 2019

@wilkinsona
Member

Let's consider this in 2.2.x alongside #14736.

added
status: blockedAn issue that's blocked on an external project change
and removed
for: team-attentionAn issue we'd like other members of the team to review
on Jan 10, 2019
added this to the 2.2.x milestone on Jan 10, 2019
added
status: blockedAn issue that's blocked on an external project change
and removed
status: blockedAn issue that's blocked on an external project change
on May 17, 2019
wilkinsona

wilkinsona commented on May 17, 2019

@wilkinsona
Member

This may still be blocked. While we have upgraded to JUnit 5 in spring-boot-starter-test, to allow users to gently migrate to it, we provide JUnit's Vintage Engine and the JUnit 4 API in the starter. Unfortunately, this means that Hamcrest 1.3 is still pulled in.

@sbrannen Do you know if JUnit 4, when being used "just" as an API on top of the Vintage Engine, requires Hamcrest 1.3, or can we exclude it and upgrade to 2.1?

28 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @sbrannen@tumbarumba@snicoll@philwebb@spencergibb

      Issue actions

        Upgrade to Hamcrest 2.1 · Issue #15555 · spring-projects/spring-boot