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

Payara 6: migrate all test cases to use JUnit 5 #9782

Closed
poikilotherm opened this issue Aug 15, 2023 · 2 comments · Fixed by #9796
Closed

Payara 6: migrate all test cases to use JUnit 5 #9782

poikilotherm opened this issue Aug 15, 2023 · 2 comments · Fixed by #9796
Assignees
Labels
Component: Code Infrastructure formerly "Feature: Code Infrastructure" Feature: Developer Guide Feature: Performance & Stability Size: 3 A percentage of a sprint. 2.1 hours.
Milestone

Comments

@poikilotherm
Copy link
Contributor

As discussed during tech hour, lets try to add another large chunk breaking change in the 6.0 release (that's what major releases are for... 😉): lets transition all test classes from JUnit 4 to JUnit 5.

This mostly requires replacing the imports. It will require adapting "Before" and "After" annotations, as the naming changes in J5. If we do have some kind of Rule or other JUnit 4 specific constructs, these would be replaces with the JUnit 5 equivalents.
In case some J4 test looks out for exceptions, this needs to be refactored, too - J5 has assertThrows now.

@poikilotherm poikilotherm self-assigned this Aug 15, 2023
@poikilotherm poikilotherm added the Size: 3 A percentage of a sprint. 2.1 hours. label Aug 15, 2023
@pdurbin
Copy link
Member

pdurbin commented Aug 17, 2023

Today @poikilotherm explained a lot more about how this upgrade is part of a larger testing vision. See maybe 10-20 minutes into today's container meeting (also linked from https://ct.gdcc.io ).

@poikilotherm
Copy link
Contributor Author

Looking forward to the point where I can start doing fancy stuff 😀

But seriously, one of my first issues in this project was "lets do more testing". We've come a long way already!

poikilotherm added a commit that referenced this issue Aug 18, 2023
poikilotherm added a commit that referenced this issue Aug 18, 2023
poikilotherm added a commit that referenced this issue Aug 22, 2023
The old Mockito is outdated. Some day Mockito 2 might no longer
be compatible with newer Java versions, so let's update now.
poikilotherm added a commit that referenced this issue Aug 22, 2023
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
@pdurbin pdurbin added this to the 6.0 milestone Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Code Infrastructure formerly "Feature: Code Infrastructure" Feature: Developer Guide Feature: Performance & Stability Size: 3 A percentage of a sprint. 2.1 hours.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants