VersionFieldIT should register transportClientPlugins (#62734)

This commit is contained in:
Christoph Büscher 2020-09-22 10:10:44 +02:00 committed by GitHub
parent 265387f348
commit 593511e5c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -15,6 +15,7 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms.Bucket;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
@ -24,10 +25,14 @@ public class VersionFieldIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return org.elasticsearch.common.collect.List.of(VersionFieldPlugin.class, LocalStateCompositeXPackPlugin.class);
return Arrays.asList(VersionFieldPlugin.class, LocalStateCompositeXPackPlugin.class);
}
@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return Arrays.asList(VersionFieldPlugin.class);
}
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/62705")
public void testTermsAggregation() throws Exception {
String indexName = "test";
createIndex(indexName);

View File

@ -13,6 +13,7 @@ import org.elasticsearch.plugins.MapperPlugin;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.search.DocValueFormat;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@ -27,7 +28,7 @@ public class VersionFieldPlugin extends Plugin implements MapperPlugin {
@Override
public List<NamedWriteableRegistry.Entry> getNamedWriteables() {
return org.elasticsearch.common.collect.List.of(
return Arrays.asList(
new NamedWriteableRegistry.Entry(
DocValueFormat.class,
VersionStringFieldMapper.VERSION_DOCVALUE.getWriteableName(),