kafka icon indicating copy to clipboard operation
kafka copied to clipboard

KAFKA-18356 Explicitly setting up instrumentation for inline mocking (Java 21+)

Open m1a2st opened this issue 1 year ago • 2 comments

Jira: https://issues.apache.org/jira/browse/KAFKA-18356

Starting from Java 21, the JDK restricts the ability of libraries to attach a Java agent to their own JVM. As a result, the inline-mock-maker might not be able to function without an explicit setup to enable instrumentation, and the JVM will always display a warning.

The mockito document

Test in my local trunk: CleanShot 2024-12-28 at 22 01 17@2x

this branch: CleanShot 2024-12-28 at 22 00 15@2x

Committer Checklist (excluded from commit message)

  • [ ] Verify design and implementation
  • [ ] Verify test coverage and CI build status
  • [ ] Verify documentation (including upgrade notes)

m1a2st avatar Dec 28 '24 14:12 m1a2st

@m1a2st any update?

chia7712 avatar Apr 15 '25 07:04 chia7712

Test in my local

This branch: CleanShot 2025-04-15 at 21 34 40@2x Main: CleanShot 2025-04-15 at 21 32 27@2x

m1a2st avatar Apr 15 '25 13:04 m1a2st

@chia7712 @ijuma Do you want to take another look or have other comments?

mimaison avatar Sep 25 '25 13:09 mimaison

No need to wait for my review @mimaison. Thanks.

ijuma avatar Sep 25 '25 18:09 ijuma