You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After introducing Java 11 HttpClient instrumentation to the agent, the ScalaAdapterTest will fail for Java 11+ test runs.
The test that fails is in the newrelic-weaver-scala module. It is ScalaAdapterTest.weaveObjectTest()
Here are some lines of the stacktrace
java.lang.IllegalAccessError: Update to static final field com.nr.weave.weavepackage.language.scala.testclasses.SomeObject$.MODULE$ attempted from a different method (<init>) than the initializer method <clinit>
at com.nr.weave.weavepackage.language.scala.testclasses.SomeObject$.<init>(ScalaAdapterTest.scala:62)
at com.nr.weave.weavepackage.language.scala.testclasses.SomeObject$.<clinit>(ScalaAdapterTest.scala)
at com.nr.weave.weavepackage.language.scala.ScalaAdapterTest.weaveObjectTest(ScalaAdapterTest.scala:32)
This test fails because of this change in the Weave.Utils class. The agent now instruments the Java 11 HttpClient so the max byte code supported with Java 11+ is version 55. This causes the test to fail.
double jvmSpecVersion = Double.valueOf(System.getProperty("java.specification.version"));
if (jvmSpecVersion >=11) {
return 55;
} else if (jvmSpecVersion >= 1.8) {
return 52;
To reproduce, run the test (assuming it has not been disabled with annotations) from the command line at the root of the project.
After introducing Java 11 HttpClient instrumentation to the agent, the ScalaAdapterTest will fail for Java 11+ test runs.
The test that fails is in the newrelic-weaver-scala module. It is
ScalaAdapterTest.weaveObjectTest()
Here are some lines of the stacktrace
This test fails because of this change in the Weave.Utils class. The agent now instruments the Java 11 HttpClient so the max byte code supported with Java 11+ is version 55. This causes the test to fail.
To reproduce, run the test (assuming it has not been disabled with annotations) from the command line at the root of the project.
./gradlew :newrelic-weaver-scala:test --tests --parallel --stacktrace -Ptest11 ScalaAdapterTest
The text was updated successfully, but these errors were encountered: