-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Migrate tests to JUnit5 #3221
Migrate tests to JUnit5 #3221
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. |
...st/src/test/java/org/apache/logging/log4j/core/async/AsyncWaitStrategyFactoryConfigTest.java
Outdated
Show resolved
Hide resolved
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
Assertions
public
modifiers from test classes and methodsexpected
andactual
, simplyifing assertions...)I validated my changes using
./mvnw verify
and(*) Some tests use
org.junit.Rule
implementations 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.x
branch if you are targeting Log4j 2; usemain
otherwise./mvnw verify
succeeds (if it fails due to code formatting issues reported by Spotless, simply run./mvnw spotless:apply
and retry)src/changelog/.2.x.x
directory