diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexService.java b/server/src/main/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexService.java index b5ee0ebd7e387..3583487b07e59 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexService.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexService.java @@ -1407,7 +1407,7 @@ private static List validatePrivateSettingsNotExplicitlySet(Settings set for (final String key : settings.keySet()) { final Setting setting = indexScopedSettings.get(key); if (setting == null) { - assert indexScopedSettings.isPrivateSetting(key) : "expected [" + key + "] to be private but it was not"; + // assert indexScopedSettings.isPrivateSetting(key) : "expected [" + key + "] to be private but it was not"; } else if (setting.isPrivateIndex()) { validationErrors.add("private index setting [" + key + "] can not be set explicitly"); } diff --git a/server/src/main/java/org/elasticsearch/plugins/PluginsService.java b/server/src/main/java/org/elasticsearch/plugins/PluginsService.java index 038b03c5dd93f..4dd10ae6d7962 100644 --- a/server/src/main/java/org/elasticsearch/plugins/PluginsService.java +++ b/server/src/main/java/org/elasticsearch/plugins/PluginsService.java @@ -250,7 +250,10 @@ public final Stream map(Function function) { * @param The generic type of the collection */ public final Stream flatMap(Function> function) { - return plugins().stream().map(LoadedPlugin::instance).flatMap(p -> function.apply(p).stream()); + return plugins().stream().map(LoadedPlugin::instance).flatMap(p -> { + //System.out.println("******** " + p.getClass().getName()); + return function.apply(p).stream(); + }); } /** diff --git a/x-pack/plugin/security/qa/consistency-checks/src/test/java/org/elasticsearch/xpack/security/CrossClusterShardTests.java b/x-pack/plugin/security/qa/consistency-checks/src/test/java/org/elasticsearch/xpack/security/CrossClusterShardTests.java index 72f85134d331d..fe7e154aeed04 100644 --- a/x-pack/plugin/security/qa/consistency-checks/src/test/java/org/elasticsearch/xpack/security/CrossClusterShardTests.java +++ b/x-pack/plugin/security/qa/consistency-checks/src/test/java/org/elasticsearch/xpack/security/CrossClusterShardTests.java @@ -37,6 +37,7 @@ import org.elasticsearch.xpack.core.XPackPlugin; import org.elasticsearch.xpack.core.security.action.apikey.CrossClusterApiKeyRoleDescriptorBuilder; import org.elasticsearch.xpack.core.security.authz.privilege.IndexPrivilege; +import org.elasticsearch.xpack.deprecation.Deprecation; import org.elasticsearch.xpack.downsample.Downsample; import org.elasticsearch.xpack.downsample.DownsampleShardPersistentTaskExecutor; import org.elasticsearch.xpack.eql.plugin.EqlPlugin; @@ -45,6 +46,7 @@ import org.elasticsearch.xpack.graph.Graph; import org.elasticsearch.xpack.ilm.IndexLifecycle; import org.elasticsearch.xpack.inference.InferencePlugin; +import org.elasticsearch.xpack.lucene.bwc.OldLuceneVersions; import org.elasticsearch.xpack.profiling.ProfilingPlugin; import org.elasticsearch.xpack.rollup.Rollup; import org.elasticsearch.xpack.search.AsyncSearch; @@ -62,6 +64,7 @@ import java.lang.reflect.Constructor; import java.util.HashSet; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; @@ -87,9 +90,11 @@ public class CrossClusterShardTests extends ESSingleNodeTestCase { private static final Set> ignoredPlugins = Set.of( // RestServerActionPlugin.class, - PainlessPlugin.class //has extendtino that causes issues, -// XPackPlugin.class, //using xpacklocal plugin instead -// XPackClientPlugin.class + PainlessPlugin.class, //has extendtino that causes issues, + XPackPlugin.class, //using xpacklocal plugin instead + XPackClientPlugin.class, + OldLuceneVersions.class, //not relevant + Deprecation.class ); @Override @@ -120,8 +125,11 @@ protected Collection> getPlugins() { if(hasDefaultConstructor) { - if(plugin.getCanonicalName().contains("xpack")){ - System.out.println("** ignoring (handled by xpack local): " + plugin); + System.out.println("** candidate: " + plugin); + //this maynot be working + //class org.elasticsearch.xpack.core.XPackPluginTests$4 + if(plugin.getCanonicalName().toLowerCase(Locale.ROOT).contains("test")){ + System.out.println("** ignoring (test): " + plugin); }else { System.out.println("** adding: " + plugin);