Remove ESIntegTestCase#pluginList

It was a useful method in 1.7 when javac's type inference wasn't as
good, but now we can just replace it with `Arrays.asList`.
This commit is contained in:
Nik Everett 2016-08-11 11:16:15 -04:00
parent 8a97f05e41
commit 9f8f2ea54b
85 changed files with 152 additions and 97 deletions

View File

@ -149,7 +149,7 @@ public class IndicesRequestIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InterceptingTransportService.TestPlugin.class, CustomScriptPlugin.class);
return Arrays.asList(InterceptingTransportService.TestPlugin.class, CustomScriptPlugin.class);
}
public static class CustomScriptPlugin extends MockScriptPlugin {

View File

@ -60,6 +60,7 @@ import org.elasticsearch.transport.TransportService;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
@ -105,7 +106,7 @@ public class TasksIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockTransportService.TestPlugin.class, TestTaskPlugin.class);
return Arrays.asList(MockTransportService.TestPlugin.class, TestTaskPlugin.class);
}
@Override

View File

@ -41,6 +41,7 @@ import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.test.store.MockFSIndexStore;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
@ -64,7 +65,7 @@ public class IndicesShardStoreRequestIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList( MockFSIndexStore.TestPlugin.class);
return Arrays.asList( MockFSIndexStore.TestPlugin.class);
}
public void testEmpty() {

View File

@ -21,6 +21,7 @@ package org.elasticsearch.bwcompat;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
import java.util.Arrays;
import java.util.Collection;
import org.elasticsearch.Version;
@ -39,7 +40,7 @@ public class IpFieldBwCompatIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class); // uses index.merge.enabled
return Arrays.asList(InternalSettingsPlugin.class); // uses index.merge.enabled
}
@Override

View File

@ -68,6 +68,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@ -90,7 +91,7 @@ public class OldIndexBackwardsCompatibilityIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class);
return Arrays.asList(InternalSettingsPlugin.class);
}
List<String> indexes;

View File

@ -54,6 +54,7 @@ import org.elasticsearch.transport.TransportService;
import org.hamcrest.Matchers;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Set;
@ -123,7 +124,7 @@ public class ClusterInfoServiceIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(TestPlugin.class,
return Arrays.asList(TestPlugin.class,
MockTransportService.TestPlugin.class);
}

View File

@ -38,6 +38,7 @@ import org.elasticsearch.test.disruption.NetworkDisruption.NetworkDisconnect;
import org.elasticsearch.test.disruption.NetworkDisruption.TwoPartitions;
import org.elasticsearch.test.transport.MockTransportService;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@ -57,7 +58,7 @@ public class PrimaryAllocationIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
// disruption tests need MockTransportService
return pluginList(MockTransportService.TestPlugin.class);
return Arrays.asList(MockTransportService.TestPlugin.class);
}
private void createStaleReplicaScenario() throws Exception {

View File

@ -32,6 +32,7 @@ import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
@ -48,7 +49,7 @@ public class MockDiskUsagesIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
// Use the mock internal cluster info service, which has fake-able disk usages
return pluginList(MockInternalClusterInfoService.TestPlugin.class);
return Arrays.asList(MockInternalClusterInfoService.TestPlugin.class);
}
public void testRerouteOccursOnDiskPassingHighWatermark() throws Exception {

View File

@ -63,7 +63,7 @@ public class ClusterServiceIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(TestPlugin.class);
return Arrays.asList(TestPlugin.class);
}
public void testAckedUpdateTask() throws Exception {

View File

@ -44,7 +44,7 @@ public class SettingsFilteringIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(SettingsFilteringPlugin.class);
return Arrays.asList(SettingsFilteringPlugin.class);
}
public static class SettingsFilteringPlugin extends Plugin {

View File

@ -183,7 +183,7 @@ public class DiscoveryWithServiceDisruptionsIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockTransportService.TestPlugin.class);
return Arrays.asList(MockTransportService.TestPlugin.class);
}
private void configureUnicastCluster(

View File

@ -51,6 +51,7 @@ import org.elasticsearch.test.store.MockFSIndexStore;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
@ -75,7 +76,7 @@ public class RecoveryFromGatewayIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockFSIndexStore.TestPlugin.class);
return Arrays.asList(MockFSIndexStore.TestPlugin.class);
}
public void testOneNodeRecoverFromGateway() throws Exception {

View File

@ -65,6 +65,7 @@ import org.elasticsearch.transport.TransportService;
import java.io.IOException;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@ -104,7 +105,7 @@ public class IndexWithShadowReplicasIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockTransportService.TestPlugin.class);
return Arrays.asList(MockTransportService.TestPlugin.class);
}
public void testCannotCreateWithBadPath() throws Exception {

View File

@ -40,7 +40,7 @@ public class SettingsListenerIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(SettingsListenerPlugin.class);
return Arrays.asList(SettingsListenerPlugin.class);
}
public static class SettingsListenerPlugin extends Plugin {

View File

@ -34,6 +34,7 @@ import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.transport.MockTransportService;
import org.elasticsearch.transport.TransportService;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
@ -61,7 +62,7 @@ public class TransportIndexFailuresIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockTransportService.TestPlugin.class);
return Arrays.asList(MockTransportService.TestPlugin.class);
}
@Override

View File

@ -28,6 +28,7 @@ import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.search.highlight.HighlightBuilder;
import org.elasticsearch.test.ESIntegTestCase;
import java.util.Arrays;
import java.util.Collection;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
@ -36,7 +37,7 @@ import static org.hamcrest.Matchers.equalTo;
public class ExternalValuesMapperIntegrationIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(ExternalMapperPlugin.class);
return Arrays.asList(ExternalMapperPlugin.class);
}
public void testHighlightingOnCustomString() throws Exception {

View File

@ -30,6 +30,7 @@ import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Before;
import java.util.Arrays;
import java.util.Collection;
import static org.elasticsearch.index.query.QueryBuilders.boolQuery;
@ -40,12 +41,12 @@ import static org.hamcrest.Matchers.instanceOf;
public class CustomQueryParserIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(DummyQueryParserPlugin.class);
return Arrays.asList(DummyQueryParserPlugin.class);
}
@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return pluginList(DummyQueryParserPlugin.class);
return Arrays.asList(DummyQueryParserPlugin.class);
}
@Override

View File

@ -86,6 +86,7 @@ import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@ -126,7 +127,7 @@ public class CorruptedFileIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockTransportService.TestPlugin.class, MockIndexEventListener.TestPlugin.class, MockFSIndexStore.TestPlugin.class,
return Arrays.asList(MockTransportService.TestPlugin.class, MockIndexEventListener.TestPlugin.class, MockFSIndexStore.TestPlugin.class,
InternalSettingsPlugin.class); // uses index.version.created
}

View File

@ -68,7 +68,7 @@ import static org.hamcrest.Matchers.notNullValue;
public class CorruptedTranslogIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockTransportService.TestPlugin.class, MockEngineFactoryPlugin.class);
return Arrays.asList(MockTransportService.TestPlugin.class, MockEngineFactoryPlugin.class);
}
public void testCorruptTranslogFiles() throws Exception {

View File

@ -38,6 +38,7 @@ import org.elasticsearch.transport.TransportRequestOptions;
import org.elasticsearch.transport.TransportService;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
@ -57,7 +58,7 @@ public class ExceptionRetryIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockTransportService.TestPlugin.class);
return Arrays.asList(MockTransportService.TestPlugin.class);
}
@Override

View File

@ -81,7 +81,7 @@ public class TruncateTranslogIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockTransportService.TestPlugin.class, MockEngineFactoryPlugin.class);
return Arrays.asList(MockTransportService.TestPlugin.class, MockEngineFactoryPlugin.class);
}
public void testCorruptTranslogTruncation() throws Exception {

View File

@ -41,6 +41,7 @@ import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.elasticsearch.test.MockIndexEventListener;
import org.hamcrest.Matchers;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
@ -69,7 +70,7 @@ public class IndicesLifecycleListenerIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockIndexEventListener.TestPlugin.class);
return Arrays.asList(MockIndexEventListener.TestPlugin.class);
}
public void testBeforeIndexAddedToCluster() throws Exception {

View File

@ -69,7 +69,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(TestPlugin.class); //
return Arrays.asList(TestPlugin.class);
}
public void testSpecifiedIndexUnavailableMultipleIndices() throws Exception {

View File

@ -31,6 +31,7 @@ import org.elasticsearch.test.InternalSettingsPlugin;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
@ -46,7 +47,7 @@ import static org.hamcrest.Matchers.notNullValue;
public class PreBuiltAnalyzerIntegrationIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(DummyAnalysisPlugin.class, InternalSettingsPlugin.class);
return Arrays.asList(DummyAnalysisPlugin.class, InternalSettingsPlugin.class);
}
public void testThatPreBuiltAnalyzersAreNotClosedOnIndexClose() throws Exception {

View File

@ -60,7 +60,7 @@ import static org.hamcrest.Matchers.equalTo;
public class RandomExceptionCircuitBreakerIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(RandomExceptionDirectoryReaderWrapper.TestPlugin.class, MockEngineFactoryPlugin.class);
return Arrays.asList(RandomExceptionDirectoryReaderWrapper.TestPlugin.class, MockEngineFactoryPlugin.class);
}
public void testBreakerWithRandomExceptions() throws IOException, InterruptedException, ExecutionException {

View File

@ -61,6 +61,7 @@ import org.elasticsearch.transport.TransportService;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
@ -95,7 +96,7 @@ public class IndexRecoveryIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockTransportService.TestPlugin.class, MockFSIndexStore.TestPlugin.class);
return Arrays.asList(MockTransportService.TestPlugin.class, MockFSIndexStore.TestPlugin.class);
}
private void assertRecoveryStateWithoutStage(RecoveryState state, int shardId, Type type,

View File

@ -75,7 +75,7 @@ public class UpdateSettingsIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(DummySettingPlugin.class);
return Arrays.asList(DummySettingPlugin.class);
}
public static class DummySettingPlugin extends Plugin {

View File

@ -91,7 +91,7 @@ public class IndicesStoreIntegrationIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockTransportService.TestPlugin.class);
return Arrays.asList(MockTransportService.TestPlugin.class);
}
@Override

View File

@ -31,6 +31,7 @@ import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.ESIntegTestCase.Scope;
import java.util.Arrays;
import java.util.Collection;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
@ -41,7 +42,7 @@ import static org.hamcrest.core.IsNull.notNullValue;
public class IndexTemplateFilteringIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(TestPlugin.class);
return Arrays.asList(TestPlugin.class);
}
public void testTemplateFiltering() throws Exception {

View File

@ -41,6 +41,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
@ -68,7 +69,7 @@ public class IngestClientIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(IngestTestPlugin.class);
return Arrays.asList(IngestTestPlugin.class);
}
public void testSimulate() throws Exception {

View File

@ -27,6 +27,7 @@ import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
@ -56,7 +57,7 @@ public class IngestProcessorNotInstalledOnAllNodesIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return installPlugin ? pluginList(IngestTestPlugin.class) : Collections.emptyList();
return installPlugin ? Arrays.asList(IngestTestPlugin.class) : Collections.emptyList();
}
@Override

View File

@ -71,6 +71,7 @@ import java.nio.file.Path;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.CountDownLatch;
@ -96,7 +97,7 @@ public class RelocationIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockTransportService.TestPlugin.class, MockIndexEventListener.TestPlugin.class);
return Arrays.asList(MockTransportService.TestPlugin.class, MockIndexEventListener.TestPlugin.class);
}
public void testSimpleRelocationNoIndexing() {

View File

@ -44,6 +44,7 @@ import org.elasticsearch.transport.TransportService;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@ -60,7 +61,7 @@ public class TruncatedRecoveryIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockTransportService.TestPlugin.class);
return Arrays.asList(MockTransportService.TestPlugin.class);
}
/**

View File

@ -43,7 +43,7 @@ public class ScriptFieldIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(CustomScriptPlugin.class);
return Arrays.asList(CustomScriptPlugin.class);
}
static int[] intArray = { Integer.MAX_VALUE, Integer.MIN_VALUE, 3 };

View File

@ -23,6 +23,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
@ -44,7 +45,7 @@ public class StoredScriptsIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(CustomScriptPlugin.class);
return Arrays.asList(CustomScriptPlugin.class);
}
public void testBasics() {

View File

@ -64,7 +64,7 @@ public class GeoDistanceIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class); // uses index.version.created
return Arrays.asList(InternalSettingsPlugin.class); // uses index.version.created
}
private Version version = VersionUtils.randomVersionBetween(random(), Version.V_2_0_0, Version.CURRENT);

View File

@ -60,7 +60,7 @@ public class GeoHashGridIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class); // uses index.version.created
return Arrays.asList(InternalSettingsPlugin.class); // uses index.version.created
}
private Version version = VersionUtils.randomVersionBetween(random(), Version.V_2_0_0, Version.CURRENT);

View File

@ -88,12 +88,12 @@ public class SignificantTermsSignificanceScoreIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(CustomSignificanceHeuristicPlugin.class);
return Arrays.asList(CustomSignificanceHeuristicPlugin.class);
}
@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return pluginList(CustomSignificanceHeuristicPlugin.class);
return Arrays.asList(CustomSignificanceHeuristicPlugin.class);
}
public String randomExecutionHint() {

View File

@ -56,7 +56,7 @@ public class SearchWithRandomExceptionsIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(RandomExceptionDirectoryReaderWrapper.TestPlugin.class, MockEngineFactoryPlugin.class);
return Arrays.asList(RandomExceptionDirectoryReaderWrapper.TestPlugin.class, MockEngineFactoryPlugin.class);
}
public void testRandomExceptions() throws IOException, InterruptedException, ExecutionException {

View File

@ -38,6 +38,7 @@ import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.store.MockFSDirectoryService;
import org.elasticsearch.test.store.MockFSIndexStore;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.concurrent.ExecutionException;
@ -48,7 +49,7 @@ public class SearchWithRandomIOExceptionsIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockFSIndexStore.TestPlugin.class);
return Arrays.asList(MockFSIndexStore.TestPlugin.class);
}
public void testRandomDirectoryIOExceptions() throws IOException, InterruptedException, ExecutionException {

View File

@ -38,6 +38,7 @@ import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.InternalSettingsPlugin;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
@ -49,7 +50,7 @@ public class ParentFieldLoadingIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class); // uses index.merge.enabled
return Arrays.asList(InternalSettingsPlugin.class); // uses index.merge.enabled
}
private final Settings indexSettings = Settings.builder()

View File

@ -44,6 +44,7 @@ import org.elasticsearch.test.ESIntegTestCase.Scope;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
@ -63,7 +64,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
public class FetchSubPhasePluginIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(FetchTermVectorsPlugin.class);
return Arrays.asList(FetchTermVectorsPlugin.class);
}
public void testPlugin() throws Exception {

View File

@ -80,7 +80,7 @@ public class SearchFieldsIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(CustomScriptPlugin.class);
return Arrays.asList(CustomScriptPlugin.class);
}
public static class CustomScriptPlugin extends MockScriptPlugin {

View File

@ -47,6 +47,7 @@ import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
@ -76,7 +77,7 @@ import static org.hamcrest.Matchers.lessThan;
public class DecayFunctionScoreIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class); // uses index.version.created
return Arrays.asList(InternalSettingsPlugin.class); // uses index.version.created
}
private final QueryBuilder baseQuery = constantScoreQuery(termQuery("test", "value"));

View File

@ -42,6 +42,7 @@ import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
@ -60,7 +61,7 @@ import static org.hamcrest.Matchers.equalTo;
public class ExplainableScriptIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(ExplainableScriptPlugin.class);
return Arrays.asList(ExplainableScriptPlugin.class);
}
public void testNativeExplainScript() throws InterruptedException, IOException, ExecutionException {

View File

@ -39,6 +39,7 @@ import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
@ -58,12 +59,12 @@ import static org.hamcrest.Matchers.equalTo;
public class FunctionScorePluginIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(CustomDistanceScorePlugin.class);
return Arrays.asList(CustomDistanceScorePlugin.class);
}
@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return pluginList(CustomDistanceScorePlugin.class);
return Arrays.asList(CustomDistanceScorePlugin.class);
}
public void testPlugin() throws Exception {

View File

@ -60,7 +60,7 @@ public class RandomScoreFunctionIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(CustomScriptPlugin.class);
return Arrays.asList(CustomScriptPlugin.class);
}
public static class CustomScriptPlugin extends MockScriptPlugin {

View File

@ -32,6 +32,7 @@ import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.InternalSettingsPlugin;
import org.elasticsearch.test.VersionUtils;
import java.util.Arrays;
import java.util.Collection;
import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE;
@ -49,7 +50,7 @@ import static org.hamcrest.Matchers.equalTo;
public class GeoBoundingBoxIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class); // uses index.version.created
return Arrays.asList(InternalSettingsPlugin.class); // uses index.version.created
}
public void testSimpleBoundingBoxTest() throws Exception {

View File

@ -36,6 +36,7 @@ import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.InternalSettingsPlugin;
import org.elasticsearch.test.VersionUtils;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
@ -56,7 +57,7 @@ public class GeoDistanceIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(CustomScriptPlugin.class, InternalSettingsPlugin.class);
return Arrays.asList(CustomScriptPlugin.class, InternalSettingsPlugin.class);
}
public static class CustomScriptPlugin extends MockScriptPlugin {

View File

@ -65,6 +65,7 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
@ -96,7 +97,7 @@ public class GeoFilterIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class); // uses index.version.created
return Arrays.asList(InternalSettingsPlugin.class); // uses index.version.created
}
private static boolean intersectSupport;

View File

@ -33,6 +33,7 @@ import org.elasticsearch.test.InternalSettingsPlugin;
import org.elasticsearch.test.VersionUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
@ -49,7 +50,7 @@ public class GeoPolygonIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class); // uses index.version.created
return Arrays.asList(InternalSettingsPlugin.class); // uses index.version.created
}
@Override

View File

@ -27,6 +27,7 @@ import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.junit.Before;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
@ -42,7 +43,7 @@ public class CustomHighlighterSearchIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(CustomHighlighterPlugin.class);
return Arrays.asList(CustomHighlighterPlugin.class);
}
@Before

View File

@ -50,6 +50,7 @@ import org.hamcrest.Matcher;
import org.hamcrest.Matchers;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
@ -95,7 +96,7 @@ public class HighlighterSearchIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class);
return Arrays.asList(InternalSettingsPlugin.class);
}
public void testHighlightingWithWildcardName() throws IOException {

View File

@ -77,7 +77,7 @@ import static org.hamcrest.Matchers.nullValue;
public class FieldSortIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class);
return Arrays.asList(InternalSettingsPlugin.class);
}
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/9421")

View File

@ -64,7 +64,7 @@ import static org.hamcrest.Matchers.equalTo;
public class GeoDistanceIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class);
return Arrays.asList(InternalSettingsPlugin.class);
}
public void testSimpleDistance() throws Exception {

View File

@ -55,7 +55,7 @@ public class GeoDistanceSortBuilderIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class);
return Arrays.asList(InternalSettingsPlugin.class);
}
public void testManyToManyGeoPoints() throws ExecutionException, InterruptedException, IOException {

View File

@ -37,6 +37,7 @@ import org.elasticsearch.test.InternalSettingsPlugin;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
@ -64,7 +65,7 @@ public class SimpleSortIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(CustomScriptPlugin.class, InternalSettingsPlugin.class);
return Arrays.asList(CustomScriptPlugin.class, InternalSettingsPlugin.class);
}
public static class CustomScriptPlugin extends MockScriptPlugin {

View File

@ -86,7 +86,7 @@ public class CompletionSuggestSearch2xIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class);
return Arrays.asList(InternalSettingsPlugin.class);
}
public void testSimple() throws Exception {

View File

@ -96,7 +96,7 @@ public class CompletionSuggestSearchIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class);
return Arrays.asList(InternalSettingsPlugin.class);
}
public void testPrefix() throws Exception {

View File

@ -89,7 +89,7 @@ public class ContextSuggestSearch2xIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class);
return Arrays.asList(InternalSettingsPlugin.class);
}
public void testBasicGeo() throws Exception {

View File

@ -38,6 +38,7 @@ import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.ESIntegTestCase.Scope;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
@ -57,12 +58,12 @@ import static org.hamcrest.Matchers.is;
public class CustomSuggesterSearchIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(CustomSuggesterPlugin.class);
return Arrays.asList(CustomSuggesterPlugin.class);
}
@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return pluginList(CustomSuggesterPlugin.class);
return Arrays.asList(CustomSuggesterPlugin.class);
}
public void testThatCustomSuggestersCanBeRegisteredAndWork() throws Exception {

View File

@ -42,6 +42,7 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.CountDownLatch;
@ -65,7 +66,7 @@ public abstract class AbstractSnapshotIntegTestCase extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockRepository.Plugin.class);
return Arrays.asList(MockRepository.Plugin.class);
}
public static long getFailureCount(String repository) {

View File

@ -67,6 +67,7 @@ import org.elasticsearch.test.rest.FakeRestRequest;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.EnumSet;
import java.util.List;
@ -95,7 +96,7 @@ import static org.hamcrest.Matchers.nullValue;
public class DedicatedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockRepository.Plugin.class);
return Arrays.asList(MockRepository.Plugin.class);
}
public void testRestorePersistentSettings() throws Exception {

View File

@ -32,6 +32,7 @@ import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.InternalSettingsPlugin;
import java.util.Arrays;
import java.util.Collection;
import java.util.Locale;
@ -52,7 +53,7 @@ public class SimpleTimestampIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(InternalSettingsPlugin.class);
return Arrays.asList(InternalSettingsPlugin.class);
}
public void testSimpleTimestamp() throws Exception {

View File

@ -32,6 +32,7 @@ import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.ESIntegTestCase.Scope;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
@ -49,7 +50,7 @@ public class UpdateByNativeScriptIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(CustomNativeScriptFactory.TestPlugin.class);
return Arrays.asList(CustomNativeScriptFactory.TestPlugin.class);
}
public void testThatUpdateUsingNativeScriptWorks() throws Exception {

View File

@ -147,6 +147,11 @@ Plugins that register custom search time behavior (`Query`, `Suggester`,
`ScoreFunction`, `FetchSubPhase`, `Highlighter`, etc) should implement
`SearchPlugin` and remove their `onModule(SearchModule)` implementation.
==== Testing Custom Plugins
`ESIntegTestCase#pluginList` has been removed. Use `Arrays.asList` instead. It
isn't needed now that all plugins require Java 1.8.
==== Mapper-Size plugin
The metadata field `_size` is not accessible in aggregations, scripts and when

View File

@ -23,6 +23,7 @@ import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import java.util.Arrays;
import java.util.Collection;
import static org.elasticsearch.test.ESIntegTestCase.Scope.SUITE;
@ -32,7 +33,7 @@ public abstract class ReindexTestCase extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(ReindexPlugin.class);
return Arrays.asList(ReindexPlugin.class);
}
protected ReindexRequestBuilder reindex() {

View File

@ -25,6 +25,7 @@ import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.transport.Netty3Plugin;
import org.elasticsearch.transport.netty3.Netty3Transport;
import java.util.Arrays;
import java.util.Collection;
@ESIntegTestCase.SuppressLocalMode
@ -61,12 +62,12 @@ public abstract class ESNetty3IntegTestCase extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(Netty3Plugin.class);
return Arrays.asList(Netty3Plugin.class);
}
@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return pluginList(Netty3Plugin.class);
return Arrays.asList(Netty3Plugin.class);
}
}

View File

@ -24,6 +24,7 @@ import org.elasticsearch.transport.Netty3Plugin;
import org.jboss.netty.handler.codec.http.HttpResponse;
import java.net.InetSocketAddress;
import java.util.Arrays;
import java.util.Collection;
import java.util.Locale;
@ -35,7 +36,7 @@ public class Netty3PipeliningEnabledIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return pluginList(Netty3Plugin.class);
return Arrays.asList(Netty3Plugin.class);
}
public void testThatNettyHttpServerSupportsPipelining() throws Exception {

View File

@ -25,6 +25,7 @@ import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.transport.Netty4Plugin;
import org.elasticsearch.transport.netty4.Netty4Transport;
import java.util.Arrays;
import java.util.Collection;
@ESIntegTestCase.SuppressLocalMode
@ -61,12 +62,12 @@ public abstract class ESNetty4IntegTestCase extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(Netty4Plugin.class);
return Arrays.asList(Netty4Plugin.class);
}
@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return pluginList(Netty4Plugin.class);
return Arrays.asList(Netty4Plugin.class);
}
}

View File

@ -28,6 +28,7 @@ import org.elasticsearch.plugin.discovery.azure.classic.AzureDiscoveryPlugin;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import java.util.Arrays;
import java.util.Collection;
public abstract class AbstractAzureComputeServiceTestCase extends ESIntegTestCase {
@ -56,7 +57,7 @@ public abstract class AbstractAzureComputeServiceTestCase extends ESIntegTestCas
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(AzureDiscoveryPlugin.class, mockPlugin);
return Arrays.asList(AzureDiscoveryPlugin.class, mockPlugin);
}
protected void checkNumberOfNodes(int expected) {

View File

@ -84,7 +84,7 @@ public class AzureDiscoveryClusterFormationTests extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(AzureDiscoveryPlugin.class, TestPlugin.class);
return Arrays.asList(AzureDiscoveryPlugin.class, TestPlugin.class);
}
private static Path keyStoreFile;

View File

@ -30,6 +30,7 @@ import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.ESIntegTestCase.ThirdParty;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
/**
@ -66,6 +67,6 @@ public abstract class AbstractAwsTestCase extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(Ec2DiscoveryPlugin.class);
return Arrays.asList(Ec2DiscoveryPlugin.class);
}
}

View File

@ -47,6 +47,7 @@ import java.net.InetSocketAddress;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@ -67,7 +68,7 @@ public class Ec2DiscoveryClusterFormationTests extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(Ec2DiscoveryPlugin.class);
return Arrays.asList(Ec2DiscoveryPlugin.class);
}
@Override

View File

@ -78,7 +78,7 @@ public class GceDiscoverTests extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(GceDiscoveryPlugin.class, TestPlugin.class);
return Arrays.asList(GceDiscoveryPlugin.class, TestPlugin.class);
}
@Override

View File

@ -27,6 +27,7 @@ import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.Locale;
import java.util.Map;
@ -41,7 +42,7 @@ public class SizeMappingIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MapperSizePlugin.class);
return Arrays.asList(MapperSizePlugin.class);
}
// issue 5053

View File

@ -23,6 +23,7 @@ import org.elasticsearch.plugin.repository.azure.AzureRepositoryPlugin;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import java.util.Arrays;
import java.util.Collection;
/**
@ -32,6 +33,6 @@ public abstract class AbstractAzureIntegTestCase extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(AzureRepositoryPlugin.class);
return Arrays.asList(AzureRepositoryPlugin.class);
}
}

View File

@ -36,6 +36,7 @@ import org.junit.After;
import org.junit.Before;
import java.net.URISyntaxException;
import java.util.Arrays;
import java.util.Collection;
public abstract class AbstractAzureRepositoryServiceIntegTestCase extends AbstractAzureIntegTestCase {
@ -81,7 +82,7 @@ public abstract class AbstractAzureRepositoryServiceIntegTestCase extends Abstra
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(TestPlugin.class, MockFSIndexStore.TestPlugin.class);
return Arrays.asList(TestPlugin.class, MockFSIndexStore.TestPlugin.class);
}
@Override

View File

@ -25,6 +25,7 @@ import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase.ThirdParty;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import static org.elasticsearch.cloud.azure.AzureTestUtils.readSettingsFromFile;
@ -48,7 +49,7 @@ public abstract class AbstractAzureWithThirdPartyIntegTestCase extends AbstractA
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(AzureRepositoryPlugin.class);
return Arrays.asList(AzureRepositoryPlugin.class);
}
}

View File

@ -30,6 +30,7 @@ import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.repositories.blobstore.ESBlobStoreRepositoryIntegTestCase;
import org.junit.BeforeClass;
import java.util.Arrays;
import java.util.Collection;
import java.util.concurrent.atomic.AtomicReference;
@ -45,7 +46,7 @@ public class GoogleCloudStorageBlobStoreRepositoryTests extends ESBlobStoreRepos
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockGoogleCloudStoragePlugin.class);
return Arrays.asList(MockGoogleCloudStoragePlugin.class);
}
@Override

View File

@ -30,6 +30,7 @@ import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.ESIntegTestCase.ThirdParty;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
/**
@ -69,6 +70,6 @@ public abstract class AbstractAwsTestCase extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(TestAwsS3Service.TestPlugin.class);
return Arrays.asList(TestAwsS3Service.TestPlugin.class);
}
}

View File

@ -24,6 +24,7 @@ import org.elasticsearch.plugin.store.smb.SMBStorePlugin;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import java.util.Arrays;
import java.util.Collection;
import static org.hamcrest.Matchers.is;
@ -31,7 +32,7 @@ import static org.hamcrest.Matchers.is;
public abstract class AbstractAzureFsTestCase extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(SMBStorePlugin.class);
return Arrays.asList(SMBStorePlugin.class);
}
public void testAzureFs() {

View File

@ -28,6 +28,7 @@ import org.elasticsearch.transport.Netty3Plugin;
import org.elasticsearch.transport.Netty4Plugin;
import org.junit.BeforeClass;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@ -68,12 +69,12 @@ public abstract class HttpSmokeTestCase extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockTcpTransportPlugin.class, Netty3Plugin.class, Netty4Plugin.class);
return Arrays.asList(MockTcpTransportPlugin.class, Netty3Plugin.class, Netty4Plugin.class);
}
@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return pluginList(MockTcpTransportPlugin.class, Netty3Plugin.class, Netty4Plugin.class);
return Arrays.asList(MockTcpTransportPlugin.class, Netty3Plugin.class, Netty4Plugin.class);
}
@Override

View File

@ -1660,13 +1660,6 @@ public abstract class ESIntegTestCase extends ESTestCase {
return Collections.emptyList();
}
/** Helper method to create list of plugins without specifying generic types. */
@SafeVarargs
@SuppressWarnings("varargs") // due to type erasure, the varargs type is non-reifiable, which causes this warning
protected final Collection<Class<? extends Plugin>> pluginList(Class<? extends Plugin>... plugins) {
return Arrays.asList(plugins);
}
/**
* This method is used to obtain additional settings for clients created by the internal cluster.
* These settings will be applied on the client in addition to some randomized settings defined in

View File

@ -27,12 +27,13 @@ import org.elasticsearch.test.disruption.NetworkDisruption.TwoPartitions;
import org.elasticsearch.test.transport.MockTransportService;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
public class NetworkDisruptionIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(MockTransportService.TestPlugin.class);
return Arrays.asList(MockTransportService.TestPlugin.class);
}
public void testNetworkPartitionWithNodeShutdown() throws IOException {