[
https://issues.apache.org/jira/browse/CASSANDRA-18181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17679225#comment-17679225
]
Ekaterina Dimitrova commented on CASSANDRA-18181:
-------------------------------------------------
h5. This affects Java distributed tests, Instance.startup and some other tests:
* ConnectionTest
* ProxyHandlerConnectionsTest
* ConnectionBurnTestTest
* FramingTest
* MessageSerializationPropertyTest
* MessageTest
* OutboundConnectionsTest
* ProxyHandlerConnectionsTest
* DriverBurnTests
* SimpleClientBurnTest
* MessagePayloadTest
The patch is posted
[here|https://github.com/ekaterinadimitrova2/cassandra/commit/a06dbb6b8f90d5b92dfa6ebffd276a218fae57fe]
The solution used is similar to what other projects did, for example HBase.
It was already discussed in CASSANDRA-17178
Pushed Jenkins CI run (to cover J8+J11), the job is in the queue as there are
already 2 jobs running in Jenkins dev.
I will check back and post a link later today to the trunk J8+J11 Jenkins CI
run but I am fairly confident the run will be fine as I ran some of the tests
locally and I was running this patch also with JDK17 for some time, too. Here
is the run with J17 branch
[J11|https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/2182/workflows/9ca49487-937a-4c72-bc78-4fbefe23db76]
and
[J17|https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/2182/workflows/e3dc630b-b7a4-4f5b-8f29-489bf43ad90f]
there are certain failures but those are not related to what we address here.
While this patch is not needed for J8+J11 It is a preparation for when we
switch to J11+J17. Trying to push in everything we can until CASSANDRA-17281
and a few other things are disentangled
> Fix tests post JDK-8210522
> --------------------------
>
> Key: CASSANDRA-18181
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18181
> Project: Cassandra
> Issue Type: Bug
> Components: CI
> Reporter: Ekaterina Dimitrova
> Assignee: Ekaterina Dimitrova
> Priority: Normal
> Fix For: 4.x
>
>
>
> From JDK-8210522:
> {code:java}
> Core reflection has a filtering mechanism to hide security and integrity
> sensitive fields and methods from Class getXXXField(s) and getXXXMethod(s).
> The filtering mechanism has been used for several releases to hide security
> sensitive fields such as System.security and Class.classLoader.
> This CSR proposes to extend the filters to hide fields from a number of
> highly security sensitive classes in java.lang.reflect and java.lang.invoke.
> {code}
> We are using at a few places in our tests
> {code:java}
> Field.class.getDeclaredField("modifiers");{code}
> This breaks as expected when tests are run with JDK17, example:
>
> {code:java}
> java.lang.RuntimeException: java.lang.NoSuchFieldException: modifiers
> at
> org.apache.cassandra.transport.MessagePayloadTest.makeCqlQueryHandlerAccessible(MessagePayloadTest.java:79)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
> at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at
> org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> at
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> at
> com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
> at
> com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:221)
> at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
> Caused by: java.lang.NoSuchFieldException: modifiers at
> java.base/java.lang.Class.getDeclaredField(Class.java:2610)
> at
> org.apache.cassandra.transport.MessagePayloadTest.makeCqlQueryHandlerAccessible(MessagePayloadTest.java:70)
>
> ... 15 more{code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]