Migrate tests to JUnit5#3221
Migrate tests to JUnit5#3221jvz merged 2 commits intoapache:2.xfrom strangelookingnerd:migrate_to_junit5
Conversation
|
It will take me some time to scroll through all the changes in this PR, but I'll try to review this and your other PRs by the end of next week. |
|
Do you have a deadline for the "Migrate to JUnit 5" task? We are swamped with work these days, so the review might take more time than anticipated. |
Not at all. I fully understand that the changeset is quite large and will take its time to review. I still hope that it will be merged eventually and I will try my best to keept it up-to-date and free of merge confilict 👍🏼 |
|
I'll review this, especially since converting tests from v4 to v5 was one of my "hobbies" in this project not that long ago. |
jvz
left a comment
There was a problem hiding this comment.
Had to review this in IntelliJ as the web UI can barely handle this. Unfortunately, I can't approve it from IntelliJ due to some Apache org settings. So here I am back in the web UI to say LGTM.
There are already some tests that already use JUnit5 as well as some pending PRs (#3219, #3218, ...) to migrate more. This PR will migrate all (*) tests to JUnit5.
Migration includes:
Assertionspublicmodifiers from test classes and methodsexpectedandactual, simplyifing assertions...)I validated my changes using
./mvnw verifyand(*) Some tests use
org.junit.Ruleimplementations that do not have a JUnit5 replacement and implementing these is non-trivial from what I can tell. Further there are some instances of other testing frameworks that do not yet support JUnit5. I plan on looking into these cases as well but deliberately did not include them in this PR.Checklist
2.xbranch if you are targeting Log4j 2; usemainotherwise./mvnw verifysucceeds (if it fails due to code formatting issues reported by Spotless, simply run./mvnw spotless:applyand retry)src/changelog/.2.x.xdirectory