Skip to content

upgrade integration tests to junit5#4023

Merged
filiphr merged 1 commit into
mapstruct:mainfrom
hduelme:upgrade-integration-tests-to-junit5
Mar 27, 2026
Merged

upgrade integration tests to junit5#4023
filiphr merged 1 commit into
mapstruct:mainfrom
hduelme:upgrade-integration-tests-to-junit5

Conversation

@hduelme

@hduelme hduelme commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

The compile tests were still using JUnit4. This PR fully migrates the integration tests to JUnit5.
To achieve this:

  • Upgraded Arquillian to version 1.7.2.Final (newer versions currently cause issues with @WithCdi)
  • Updated Spring tests to use JUnit6 by overriding the org.junit.jupiter.version property. (springframework version 7 requires JUnit6)
  • Applied JUnit5 conventions and code style across the test suite

@filiphr

filiphr commented Mar 26, 2026

Copy link
Copy Markdown
Member

Thanks @hduelme. Mostly it looks OK. I'm curious, why couldn't we upgrade to JUnit 6 everywhere? What isn't working if we do that?

@hduelme

hduelme commented Mar 27, 2026

Copy link
Copy Markdown
Contributor Author

@filiphr I attempted to upgrade to JUnit 6, but encountered a compatibility issue.
JUnit 6 requires Java 17 as a minimum, which breaks our CI pipeline for Java 8 and Java 11 environments. The build failure is visible in the linked CI run:https://github.com/hduelme/mapstruct/actions/runs/23637604503/job/68850229523.

@filiphr

filiphr commented Mar 27, 2026

Copy link
Copy Markdown
Member

Gotcha, thanks @hduelme. I guess we are soon going to need to bump to Java 17 as baseline. But let's do that after MapStruct 1.7.

@filiphr filiphr merged commit 6a56751 into mapstruct:main Mar 27, 2026
5 checks passed
@filiphr filiphr added the build label Mar 27, 2026
@filiphr filiphr added this to the 1.7.0.Beta2 milestone Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants