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

refactor log4j-core-test to junit 5 #1

Closed
wants to merge 4 commits into from

Conversation

ninetteadhikari
Copy link
Member

@ninetteadhikari ninetteadhikari commented Sep 17, 2024

Introduction

We are from Neighbourhoodie, the implementation partner of the STF Bug Resilience Program. This work is part of our agreed Milestone 1. Upgrade from JUnit 4 to JUnit 5. This PR migrates the tests located in x to JUnit5.c

Please note the log4j-core-test module contains over 150 files and this PR updates the tests for 40 of them. Further PRs will be made to update the rest of the tests.

Checklist

  • Base your changes on 2.x branch if you are targeting Log4j 2; use main otherwise
  • ./mvnw verify succeeds (if it fails due to code formatting issues reported by Spotless, simply run ./mvnw spotless:apply and retry)
  • Non-trivial changes contain an entry file in the src/changelog/.2.x.x directory
  • Tests for the changes are provided
  • Commits are signed (optional, but highly recommended)

Copy link

github-actions bot commented Sep 17, 2024

Job Requested goals Build Tool Version Build Outcome Build Scan®
build-macos-latest clean install 3.9.8 Build Scan NOT_PUBLISHED
build-ubuntu-latest clean install 3.9.8 Build Scan NOT_PUBLISHED
build-windows-latest clean install 3.9.8 Build Scan NOT_PUBLISHED
Generated by gradle/develocity-actions

@ninetteadhikari ninetteadhikari changed the title wip: add junit 5 components wip: refactor log4j-core-test to junit 5 Sep 19, 2024
@ninetteadhikari ninetteadhikari force-pushed the refactor-log4j-core-test1 branch 4 times, most recently from 6422755 to 12a1600 Compare September 25, 2024 12:16
@ninetteadhikari ninetteadhikari force-pushed the refactor-log4j-core-test1 branch 3 times, most recently from f2ff08f to d18b772 Compare September 30, 2024 09:18
@ninetteadhikari ninetteadhikari marked this pull request as ready for review October 1, 2024 08:55
@ninetteadhikari ninetteadhikari changed the title wip: refactor log4j-core-test to junit 5 refactor log4j-core-test to junit 5 Oct 1, 2024
@@ -53,6 +52,6 @@ public void testFlushAtEndOfBatch() throws Exception {
reader.close();
file.delete();
assertNotNull("line1", line1);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to change the order? Not sure

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops you are right! i wonder how it passed the tests.. 🤔

@@ -65,9 +64,9 @@ public void testAsyncLogWritesToLog() throws Exception {
reader.close();
file.delete();
assertNotNull("line1", line1);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to change the order?

@ninetteadhikari ninetteadhikari force-pushed the refactor-log4j-core-test1 branch 3 times, most recently from 39f6585 to feafaee Compare October 7, 2024 08:16
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.

3 participants