Attach Mockito as an agent
envgap__strimzi__strimzi-kafka-operator-12749
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
c00a682d151f0888a6f78c0a577d64056814342d- Manifest
pom.xml- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
strimzi/strimzi-kafka-operator #12749 · read the original issue
When running some tests using Mockito we get the following warning: ``` Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3 OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended WARNING: A Java agent has been loaded dynamically (/Users/scholzj/.m2/repository/net/bytebuddy/byte-buddy-agent/1.17.7/byte-buddy-agent-1.17.7.jar) WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information WARNING: Dynamic loading of agents will be disallowed by default in a future release ``` Steps to reproduce: * Go to `cluster-operator` * Run `mvn test -Dtest=io.strimzi.operator.cluster.operator.assembly.KafkaListenerReconcilerRoutesTest` * Check the output I tried to fix it in https://github.com/strimzi/strimzi-kafka-operator/pull/12748 but it does not seem to be so simple. The PR fixes the warnings in the tests where it was raised. But it seems to break other tests/modules. So maybe we need to apply it on module-by-module basis. So this issue should be used to keep track of it. This is not urgent as we have no plans to move beyond Java 21 right now, but it would be nice to be prepared.
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]