-
Notifications
You must be signed in to change notification settings - Fork 42
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
fix: Pin byte-buddy(-agent) version to 1.14.19 to workaround Mockito issue #1060
Conversation
Workaround to make Mockito tests to pass under Java 21 Signed-off-by: Ryan Prayogo <[email protected]>
The fix looks reasonable given the issue output. The linked issue suggests that a more recent version of mockito may alleviate the need to set these vars. The PR merged in 2023. They had a release this past May. Could we just upgrade mockito and have that work instead? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1060 +/- ##
============================================
+ Coverage 95.03% 95.25% +0.22%
- Complexity 392 393 +1
============================================
Files 38 38
Lines 886 886
Branches 54 54
============================================
+ Hits 842 844 +2
+ Misses 24 23 -1
+ Partials 20 19 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Ryan Prayogo <[email protected]>
Signed-off-by: Ryan Prayogo <[email protected]>
@@ -13,7 +13,7 @@ | |||
<junit.jupiter.version>5.11.0</junit.jupiter.version> | |||
<!-- exclusion expression for e2e tests --> | |||
<testExclusions>**/e2e/*.java</testExclusions> | |||
<module-name>${groupId}.${artifactId}</module-name> | |||
<module-name>${project.groupId}.${project.artifactId}</module-name> |
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.
Fixing maven warnings
[WARNING] The expression ${groupId} is deprecated. Please use ${project.groupId} instead.
[WARNING] The expression ${artifactId} is deprecated. Please use ${project.artifactId} instead.
Signed-off-by: Ryan Prayogo <[email protected]>
This solves the issue for me locally! very nice to have! |
We could try mockito 5. This is the latest version of 4. |
@justinabrahms ahh, we can't. Mockito 5 doesn't support Java 8. For as long as we want to have Java 8 support, we need to stick with Mockito 4. This PR seems like the best of both worlds. |
Signed-off-by: Todd Baert <[email protected]>
|
Pin byte-buddy(-agent) version to 1.14.19 to workaround Mockito issue
Workaround to make Mockito tests to pass under Java 21 due to this open Mockito bug
Related Issues
Fixes #1059
Notes
Follow-up Tasks
How to test