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

Migrates all tests and fixtures from JUnit 4.x to Jupiter #1387

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

codefromthecrypt
Copy link
Member

@codefromthecrypt codefromthecrypt commented Dec 17, 2023

This migrates all tests and fixtures from JUnit 4.x to Jupiter. Notably, this allows packages such as brave-tests to be unlocked from old junit, allowing integration modules like zipkin-gcp to upgrade/

I began by using this command from @TeamModerne, which got surprisingly far despite this being a very complex project.

./mvnw org.openrewrite.maven:rewrite-maven-plugin:run \
  -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-testing-frameworks:LATEST \
  -Drewrite.activeRecipes=org.openrewrite.java.testing.junit5.JUnit4to5Migration

After that, I focused on the following areas which led to conclusion:

  • move to the next minor version as this is not a patch-scoped change
  • fix formatting and visibility
  • revert mockwebserver3 upgrade as it introduced classpath incompatibility
  • port Mockito and nested class junit rules
  • address test drift as dubbo tests weren't running before for some reason
  • port the maven-invoker-plugin tests
  • move kafka tests off kafka-unit which I really couldn't get to work
  • port the internal rules, notably JMS took the most time

There are more polishing available, but this PR is already too big to add more, and these things can be done later, anyway.

Signed-off-by: Adrian Cole <adrian@tetrate.io>
@codefromthecrypt
Copy link
Member Author

After this, I'll bump any main versions that can be bumped easily and prepare for the next release.

@codefromthecrypt codefromthecrypt marked this pull request as ready for review December 17, 2023 22:29
@codefromthecrypt codefromthecrypt merged commit b0ad9aa into master Dec 18, 2023
3 checks passed
@codefromthecrypt codefromthecrypt deleted the jupiter branch December 18, 2023 01:00
@codefromthecrypt
Copy link
Member Author

thanks for the look, finishing up next!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants