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

fix: Pin byte-buddy(-agent) version to 1.14.19 to workaround Mockito issue #1060

Merged
merged 7 commits into from
Aug 22, 2024

Conversation

ryanprayogo
Copy link
Contributor

@ryanprayogo ryanprayogo commented Aug 21, 2024

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

Workaround to make Mockito tests to pass under Java 21

Signed-off-by: Ryan Prayogo <[email protected]>
@ryanprayogo ryanprayogo requested a review from a team as a code owner August 21, 2024 21:36
@justinabrahms
Copy link
Member

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?

Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.25%. Comparing base (b7ed041) to head (d4485cc).

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     
Flag Coverage Δ
unittests 95.25% <ø> (+0.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -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>
Copy link
Contributor Author

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.

@toddbaert
Copy link
Member

This solves the issue for me locally! very nice to have!

@toddbaert
Copy link
Member

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?

We could try mockito 5. This is the latest version of 4.

@toddbaert
Copy link
Member

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?

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.

@toddbaert toddbaert self-requested a review August 22, 2024 16:53
@ryanprayogo ryanprayogo changed the title fix: Add the net.bytebuddy.experimental=true system property fix: Pin byte-buddy(-agent) version to 1.14.19 to workaround Mockito issue Aug 22, 2024
Copy link

@toddbaert toddbaert merged commit 32340a3 into open-feature:main Aug 22, 2024
10 checks passed
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.

Some tests are failing under Java 21
3 participants