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

Migrate log4j-osgi-test to JUnit 5 #3219

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

AlbaHerrerias
Copy link
Contributor

@AlbaHerrerias AlbaHerrerias commented Nov 19, 2024

Hello 👋

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 log4j-osgi-test.

Thank you!

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)

@AlbaHerrerias
Copy link
Contributor Author

We have some questions we would like to ask. We've found that the test suites CoreOsgiTest, JULProviderTest and SLF4JProviderTest are using PaxExam, and the current version does not support JUnit 5. Before attempting an upgrade, we were wondering, does this feature need to be updated? We are missing some context, what is being checked by using this runner? Any help in this regard is greatly appreciated. Thank you!

Copy link

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

@ppkarwasz
Copy link
Contributor

Before attempting an upgrade, we were wondering, does this feature need to be updated? We are missing some context, what is being checked by using this runner? Any help in this regard is greatly appreciated. Thank you!

Since PAX Exam is basically dormant, it would be better to move those tests to a different framework, but honestly I don't know which. @HannesWell, any suggestions?

Frameworks like Testcontainer for Java or Arquillian are not very OSGi friendly. The "new" osgi-test assumes that the test is already running in an OSGi environment. Maybe we could use something like laeubisoft/osgi-test-framework or the BND Testing Plugin. I will experiment with the latter. We already use BND plugins and they work well. I would like to keep the list of Open Source vendors we rely on minimal.

@ppkarwasz
Copy link
Contributor

@vy, should we move log4j-osgi-test to the Samples repository (which is our integration test repo).

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.

2 participants