radarsh / gradle-test-logger-plugin

A Gradle plugin for printing beautiful logs on the console while running tests
Apache License 2.0
846 stars 38 forks source link

can something be done to future-proof against "WARNING: Dynamic loading of agents will be disallowed by default in a future release"? #349

Closed gbirchmeier closed 2 weeks ago

gbirchmeier commented 2 weeks ago

Description

The current version 4.0.0 triggers this warning in openjdk 21:

    WARNING: A Java agent has been loaded dynamically (/Users/grantb/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy-agent/1.14.19/154da3a65b4f4a909d3e5bdec55d1b2b4cbb6ce1/byte-buddy-agent-1.14.19.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

There are ways to hide this warning, but that only hides the problem. The last line implies that sometime in the future htis will break.

Is there some way this plugin can run without dynamically loading an agent?

Versions

Type of test being run

JUnit, but that isn't really relevant to the cause.

Test logger configuration

Again, probably not relevant.

testlogger {
    // https://github.com/radarsh/gradle-test-logger-plugin
    showExceptions = true
    showStackTraces = true
    showFullStackTraces = false
    showCauses = true
    slowThreshold = 2000
    showSummary = true
    showSimpleNames = false
    showPassed = false
    showSkipped = true
    showFailed = true
    showOnlySlow = false
    showStandardStreams = true
    showPassedStandardStreams = true
    showSkippedStandardStreams = true
    showFailedStandardStreams = true
}

Screenshots

image

Additional information

None

gbirchmeier commented 2 weeks ago

Never mind, I believe this is actually a gradle issue. When I turn on standardoutput without this plugin, I got this error too.