-
Notifications
You must be signed in to change notification settings - Fork 484
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 all tests to JUnit5 #9796
Conversation
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@pdurbin done - the enforcer takes care of this. If someone accidentally re-introduces JUnit 4, their Maven will fail to execute tests. |
This comment has been minimized.
This comment has been minimized.
cc89297
to
d6c3f7a
Compare
This comment has been minimized.
This comment has been minimized.
The old Mockito is outdated. Some day Mockito 2 might no longer be compatible with newer Java versions, so let's update now.
Replace the following API usages no longer available: - Mockito.verifyZeroInteractions() does not exist anymore since Mockito 4 - Mockito.any() does no longer match varargs since Mockito 5 - org.mockito.Matcher does no longer exist since Mockito 4
📦 Pushed preview images as
🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
This failed on Jenkins with this: TASK [dataverse : build warfile with specified tests using custom maven. tail /tmp/dataverse/mvn.out for gory details.] *** |
I kicked off another Jenkins run: https://jenkins.dataverse.org/job/IQSS-Dataverse-Develop-PR/job/PR-9796/10/ I also kicked off https://github.com/gdcc/api-test-runner/actions/runs/5940755754 (the new "manual" workflow added by @poikilotherm ) |
I know Jenkins is failing but we have a Slack thread about it: https://iqss.slack.com/archives/C010LA04BCG/p1692718312562289 https://github.com/gdcc/api-test-runner/actions/runs/5940755754 passed so I'm going to approve this PR. Here's where you can see that the correct branch was tested: |
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.
Looks good!
As discussed at standup, I just kicked off a Jenkins run: https://jenkins.dataverse.org/job/IQSS-Dataverse-Develop-PR/job/PR-9796/12/ It should pass now that Jenkins has been updated to Java 17. |
Woo-hoo! As always, thanks y'all for taking the time and getting it merged! Much appreciated! |
What this PR does / why we need it:
To modernize testing and extend with helpers, etc, we need to move the test base to JUnit 5. Slow migration didn't happen, so let's get this over with.
Which issue(s) this PR closes:
Closes #9782
Special notes for your reviewer:
None. Basically, all tests have not been changed in meaning, but in JUnit API syntax. (As all tests were passing before and are passing now, it's the same state. However, there is a remote chance this change can introduce a testing regression.)
Here are some details on what changes were necessary to complete the task: https://junit.org/junit5/docs/current/user-guide/#migrating-from-junit4
Suggestions on how to test this:
Run all the tests.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No
Is there a release notes update needed for this change?:
Probably.
Additional documentation:
Will be included.