Skip to content

Conversation

@sideshowcoder
Copy link
Contributor

This PR

Removes configuration to not reuse forks and keep fork count at 1 for testing. This was added previously to get around test issues, but is no longer needed

Configure mockito as a javaagent to remove warning on newer Java versions

Related Issues

#1314 introduced this initially.

Notes

@sideshowcoder sideshowcoder requested review from a team as code owners October 23, 2025 13:41
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @sideshowcoder, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the project's build configuration by removing obsolete test execution settings and integrating Mockito as a Java agent. The removal of the forkCount and reuseForks properties simplifies the maven-surefire-plugin setup, while the Java agent configuration for Mockito ensures compatibility and prevents warnings when running tests on modern Java environments.

Highlights

  • Mockito Java Agent Configuration: Configured Mockito to run as a Java agent by adding org.mockito.jar and surefireArgLine properties to the pom.xml. This change addresses warnings that may occur on newer Java versions.
  • Removed Surefire Fork Configuration: Eliminated the explicit forkCount and reuseForks settings from the maven-surefire-plugin configuration. These settings were previously added to resolve test issues but are no longer necessary.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the fork configuration for Maven Surefire Plugin and configures Mockito as a javaagent to suppress warnings on newer Java versions. I have added comments regarding the Mockito configuration.

@sideshowcoder sideshowcoder force-pushed the sideshowcoder/remove-fork-non-reuse-add-mockito-javaagent branch from 0f74f81 to 8d14d73 Compare October 23, 2025 13:43
@sideshowcoder sideshowcoder changed the title remove fork configuration fix: remove fork configuration Oct 23, 2025
- Added previously to get around test issues, reuseForks false and forkCount 1 are
  no longer needed.
- configure mockito as a javaagent to remove warning on newer Java versions

Signed-off-by: Philipp Fehre <[email protected]>
@sideshowcoder sideshowcoder force-pushed the sideshowcoder/remove-fork-non-reuse-add-mockito-javaagent branch from 8d14d73 to c034394 Compare October 23, 2025 14:04
surefire, failsafe, vmlens all need mockito argline to work with Java 21+ to
avoid deprecated dynamic java agent loading.

Signed-off-by: Philipp Fehre <[email protected]>
@sideshowcoder sideshowcoder force-pushed the sideshowcoder/remove-fork-non-reuse-add-mockito-javaagent branch from 3ab77a1 to 16f86b0 Compare October 24, 2025 11:56
@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.20%. Comparing base (9df27e4) to head (8222ef7).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1685      +/-   ##
============================================
+ Coverage     91.93%   93.20%   +1.26%     
- Complexity      517      520       +3     
============================================
  Files            51       51              
  Lines          1265     1265              
  Branches        112      112              
============================================
+ Hits           1163     1179      +16     
+ Misses           64       50      -14     
+ Partials         38       36       -2     
Flag Coverage Δ
unittests 93.20% <ø> (+1.26%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sideshowcoder
Copy link
Contributor Author

Thanks for the review @chrfwow, there was an issue with the surefireArgLine breaking the creating of the coverage reports, this is fixed now, also was missing mockito agent from the vmlens. All is fine now, with this the testare quicker as well again 🥳

@chrfwow
Copy link
Contributor

chrfwow commented Oct 24, 2025

also was missing mockito agent from the vmlens

Didn't the tests work just fine? @sideshowcoder
Anyway, thanks for fixing the build!

@beeme1mr beeme1mr changed the title fix: remove fork configuration chore: remove fork configuration Oct 24, 2025
@sonarqubecloud
Copy link

@sideshowcoder
Copy link
Contributor Author

@chrfwow yes the tests worked on Java 17 but break on newer versions (I think from 25 onwards?) because the autoloading of the javaagent has been deprecated before. It now requires explicit setting it.

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.

3 participants