Repository navigation
Upgrade existing Platform and Vintage dependencies in the JUnit 6 migration - #1261
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JUnit5to6Migrationupgrades Jupiter and the JUnit BOM but leaves explicitly declared JUnit Platform and Vintage dependencies on their old major versions. Its launcher addition skips an existing launcher, so a Gradle build migrated through Spring Boot 3.x → 4.2 can end up with Jupiter/engine 6.1.3 and launcher 1.14.4. Test discovery then fails withNoSuchMethodErrorinExecutionRequest.create(...).Upgrade existing
org.junit.platform:*andorg.junit.vintage:*declarations to 6.x alongside Jupiter. Keep the existing launcher-addition step for builds without one, and remove unsupported Platform artifacts before the group upgrade as before. This belongs in the shared JUnit migration, so non-Spring users receive the fix too. It reuses declarative dependency upgrades and adds no visitor or version pin.Found while verifying https://github.com/moderneinc/customer-requests/issues/3176 and moderneinc/rewrite-spring#520 against
pbb6w7/gs-spring-bootat base commit7d77ad3. The original Gradle sample compiled and tested successfully; the migrated sample compiled but failed discovery. Temporarily changing only the launcher from 1.14.4 to 6.1.3 restored its passing compile/check. That diagnostic application edit was reverted; it is not a substitute for the recipe regression tests.Validation:
checkfor the JUnit 6 family and JUnit 6 best-practices composite passes: 100 tests, zero failures; recipe catalog validators also pass.recipeCsvGeneratetask and kept only this migration and its parent composite's generated rows. RanlicenseFormatseparately; it passes.git diff --checkpasses.