Skip to content

Tests fail due to security manager issue #5193

@adnapibar

Description

@adnapibar

Describe the bug
I am seeing test fail due to java security manager not able to be installed. I'm using Amazon Corretto JDK (17.0.5)

Expected behavior
Test should run

Screenshots

> Task :server:test
OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=warn; support was removed in 17.0

unable to install test security manager
java.lang.RuntimeException: unable to install test security manager
	at org.opensearch.bootstrap.BootstrapForTesting.<clinit>(BootstrapForTesting.java:190)
	at org.opensearch.test.OpenSearchTestCase.<clinit>(OpenSearchTestCase.java:257)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:495)
	at java.base/java.lang.Class.forName(Class.java:474)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:623)
Caused by: 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:425)
	at org.opensearch.bootstrap.BootstrapForTesting.<clinit>(BootstrapForTesting.java:172)
	... 5 more

Host/Environment (please complete the following information):

  • OS: Ubuntu
  • Version 22.04.1

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions