Skip to content

Migrate log4j-iostreams to use JUnit 5 APIs and compatible helper classes - #3248

Closed
jcoglan wants to merge 2 commits into
apache:2.xfrom
neighbourhoodie:junit5-iostreams
Closed

Migrate log4j-iostreams to use JUnit 5 APIs and compatible helper classes#3248
jcoglan wants to merge 2 commits into
apache:2.xfrom
neighbourhoodie:junit5-iostreams

Conversation

@jcoglan

@jcoglan jcoglan commented Nov 28, 2024

Copy link
Copy Markdown
Contributor

Hi, I'm 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 log4j-iostreams.

These changes are mostly straightforward replacements of the JUnit 4 annotations with JUnit 5 ones. The only thing I was unsure about is that I had to add constructors to all the test classes to accept the LoggerContext argument -- I was wondering if there's a way of just doing this in the abstract classes and having all their children just work without this extra boilerplate.

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)

@github-actions

github-actions Bot commented Dec 3, 2024

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

@ramanathan1504

Copy link
Copy Markdown
Contributor

suppressed by #4261

@github-project-automation github-project-automation Bot moved this from To triage to Done in Log4j bug tracker Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants