Set the elasticsearch-nio codebase for tests (#28067)
This commit sets the elasticsearch-nio code base in the BootstrapForTesting class. This is necessary as that codebase needs socket permissions. Setting the codebase manually is necessary as intellij does not package our internal libraries when running tests.
This commit is contained in:
parent
47a506d2db
commit
be5da2815d
|
@ -135,6 +135,7 @@ public class BootstrapForTesting {
|
||||||
if (System.getProperty("tests.gradle") == null) {
|
if (System.getProperty("tests.gradle") == null) {
|
||||||
// intellij and eclipse don't package our internal libs, so we need to set the codebases for them manually
|
// intellij and eclipse don't package our internal libs, so we need to set the codebases for them manually
|
||||||
addClassCodebase(codebases,"plugin-classloader", "org.elasticsearch.plugins.ExtendedPluginsClassLoader");
|
addClassCodebase(codebases,"plugin-classloader", "org.elasticsearch.plugins.ExtendedPluginsClassLoader");
|
||||||
|
addClassCodebase(codebases,"elasticsearch-nio", "org.elasticsearch.nio.ChannelFactory");
|
||||||
}
|
}
|
||||||
final Policy testFramework = Security.readPolicy(Bootstrap.class.getResource("test-framework.policy"), codebases);
|
final Policy testFramework = Security.readPolicy(Bootstrap.class.getResource("test-framework.policy"), codebases);
|
||||||
final Policy esPolicy = new ESPolicy(codebases, perms, getPluginPermissions(), true);
|
final Policy esPolicy = new ESPolicy(codebases, perms, getPluginPermissions(), true);
|
||||||
|
|
|
@ -896,9 +896,7 @@ public abstract class ESTestCase extends LuceneTestCase {
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void setUseNio() throws Exception {
|
public static void setUseNio() throws Exception {
|
||||||
// useNio = randomBoolean();
|
useNio = randomBoolean();
|
||||||
// TODO: Temporarily disable nio as it does not work with intellij testrunner
|
|
||||||
useNio = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getTestTransportType() {
|
public static String getTestTransportType() {
|
||||||
|
|
Loading…
Reference in New Issue