spring-cloud-gateway
spring-cloud-gateway copied to clipboard
Switch remaining jUnit 4 tests to jUnit Jupiter
Hi @OlgaMaciaszek, I would like to work on this issue.
Hi @OlgaMaciaszek I would like to try this one
So there was an earlier attempt in #2387 which broke down due to issues migrating the ModifiedClasspathRunner
tests. Might I suggest we start fresh not with a complete migration, but instead with a phased migration? That way at least most of the tests can already adopt the new JUnit 5 constructs, while we run the remaining JUnit 4 tests through the vintage runner.
The majority of the migration could then be achieved through the following command:
mvn org.openrewrite.maven:rewrite-maven-plugin:4.27.0:run \
-Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-testing-frameworks:1.24.0 \
-DactiveRecipes=org.openrewrite.java.testing.junit5.JUnit5BestPractices
If you refrain from fixing failed tests (for now), and instead revert any test failures, that could mean the simple cases don't need much in terms of review.
Subsequent pull requests can than be added later that do actually need more thorough changes and review, before we fully remove the vintage runner from the classpath.