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 tests to JUnit5 #632

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

strangelookingnerd
Copy link
Contributor

This PR aims to migrate all tests to JUnit5. Changes include:

  • Migrate annotations and imports
  • Migrate assertions
  • Remove public visibility for test classes and methods
  • Minor clean up

There are two exceptions where a migration was not possible as the tests rely on Rule implementations that have not (yet) been migrated to JUnit5:

  • SupportAutomatedBundleConfigurationSystemPropertiesTest using RealJenkinsRule
  • SlaveLaunchLogsTest using InboundAgentRule

I am well aware that this is a quite large changeset however I hope that there is still interest in this PR and it will be reviewed.
If there are any questions, please do not hesitate to ping me.

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@strangelookingnerd
Copy link
Contributor Author

Looking at the failed tests I'm a little confused to be honest. Not sure how my changes could have affected the test results here. I will try to investigate a little further.

* Migrate annotations and imports
* Migrate assertions
* Remove public visibility for test classes and methods
* Minor code cleanup
@jglick
Copy link
Member

jglick commented Feb 21, 2025

Tests in this plugin, especially on Windows, are in a state of flux given the recent infrastructure changes. I would not advise any refactorings on this plugin’s tests until the existing tests are stable.

(I also personally do not plan to spend any time reviewing JUnit 5 migration PRs. If there are any other active maintainers, they can feel free.)

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