From 2574064e665900c4775d3d47c86564321cd40543 Mon Sep 17 00:00:00 2001 From: tomcallahan Date: Tue, 10 Apr 2018 09:08:58 -0400 Subject: [PATCH] Enable rest tests via IDEs (#29439) Currently rest-based tests do not work from the IDE, as the security manager is configured to permit certain network operations when using the snapshot jars compiled by gradle. We have an existing workaround that explicitly associates a codebase with the path from which the classes are loaded (in this case, the IDE build directory). This PR adds the rest client to this workaround list. --- .../java/org/elasticsearch/bootstrap/BootstrapForTesting.java | 1 + 1 file changed, 1 insertion(+) diff --git a/test/framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java b/test/framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java index 60821517215..c4bf2518a9f 100644 --- a/test/framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java +++ b/test/framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java @@ -140,6 +140,7 @@ public class BootstrapForTesting { addClassCodebase(codebases,"plugin-classloader", "org.elasticsearch.plugins.ExtendedPluginsClassLoader"); addClassCodebase(codebases,"elasticsearch-nio", "org.elasticsearch.nio.ChannelFactory"); addClassCodebase(codebases, "elasticsearch-secure-sm", "org.elasticsearch.secure_sm.SecureSM"); + addClassCodebase(codebases, "elasticsearch-rest-client", "org.elasticsearch.client.RestClient"); } final Policy testFramework = Security.readPolicy(Bootstrap.class.getResource("test-framework.policy"), codebases); final Policy esPolicy = new ESPolicy(codebases, perms, getPluginPermissions(), true);