dpol1 commented on issue #1418:
URL: https://github.com/apache/stormcrawler/issues/1418#issuecomment-3980838636

   Hi @tballison @rzo1,
   
   I am a new contributor and I would like to pick up this `good first issue`!
   
   I've looked into the Mockito documentation provided. The warning is 
triggered because newer JDKs (like Java 21+) restrict the dynamic loading of 
agents. To resolve this without suppressing other potentially useful warnings, 
we need to explicitly attach Mockito as a `javaagent` during the test execution.
   
   My plan is to update the `maven-surefire-plugin` configuration in the root 
`pom.xml`. Since the project already relies on `<argLine>` (e.g., for JaCoCo), 
I will safely append the Mockito agent to the existing `argLine` like this:
   
   ```xml
   <argLine>${argLine} 
-javaagent:${settings.localRepository}/org/mockito/mockito-core/${mockito.version}/mockito-core-${mockito.version}.jar</argLine>
   ```
   
   I think this approach remove the warning entirely while keeping the rest of 
the test suite and coverage metrics intact.
   
   Does this implementation sound good for you?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to