Class BootstrapForTesting

java.lang.Object
org.elasticsearch.bootstrap.BootstrapForTesting

public class BootstrapForTesting extends Object
Initializes natives and installs test security manager (init'd early by base classes to ensure it happens regardless of which test case happens to be first, test ordering, etc).

The idea is to mimic as much as possible what happens with ES in production mode (e.g. assign permissions and install security manager the same way)

  • Constructor Details

    • BootstrapForTesting

      public BootstrapForTesting()
  • Method Details

    • ensureInitialized

      public static void ensureInitialized()
    • disableTestSecurityManager

      public static Closeable disableTestSecurityManager()
      Temporarily dsiables security manager for a test.

      This method is only callable by ESTestCase.

      Returns:
      A closeable object which restores the test security manager