[
https://issues.apache.org/jira/browse/AMQ-9366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17778741#comment-17778741
]
Matt Pavlovich commented on AMQ-9366:
-------------------------------------
The usage of SecurityManager provides a quick hack to _synchronously_ know when
a number of files is written, then simulate an error. There doesn't appear to
be a direct replacement for this (jdk WatchService is async) so we probably
need to extend/override KahaDB Journal class to support this test scenario.
> Fix kahadb test failing with JDK 21 due to deprecated SecurityManager
> ---------------------------------------------------------------------
>
> Key: AMQ-9366
> URL: https://issues.apache.org/jira/browse/AMQ-9366
> Project: ActiveMQ
> Issue Type: Task
> Reporter: Matt Pavlovich
> Assignee: Jean-Baptiste Onofré
> Priority: Minor
> Fix For: 6.0.1
>
>
> {noformat}
> [INFO] Running org.apache.activemq.store.kahadb.JournalArchiveTest
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.253
> s <<< FAILURE! -- in org.apache.activemq.store.kahadb.JournalArchiveTest
> [ERROR]
> org.apache.activemq.store.kahadb.JournalArchiveTest.testRecoveryOnArchiveFailure
> -- Time elapsed: 0.225 s <<< ERROR!
> java.lang.UnsupportedOperationException: The Security Manager is deprecated
> and will be removed in a future release
> at java.base/java.lang.System.setSecurityManager(System.java:429)
> at
> org.apache.activemq.store.kahadb.JournalArchiveTest.testRecoveryOnArchiveFailure(JournalArchiveTest.java:122)
> at
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)