From 593511e5c9ba55e29f64b82047f9a109a7aa4e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BCscher?= Date: Tue, 22 Sep 2020 10:10:44 +0200 Subject: [PATCH] VersionFieldIT should register transportClientPlugins (#62734) --- .../elasticsearch/xpack/versionfield/VersionFieldIT.java | 9 +++++++-- .../xpack/versionfield/VersionFieldPlugin.java | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/x-pack/plugin/versionfield/src/internalClusterTest/java/org/elasticsearch/xpack/versionfield/VersionFieldIT.java b/x-pack/plugin/versionfield/src/internalClusterTest/java/org/elasticsearch/xpack/versionfield/VersionFieldIT.java index 79ca3278ba2..7445bfab0f9 100644 --- a/x-pack/plugin/versionfield/src/internalClusterTest/java/org/elasticsearch/xpack/versionfield/VersionFieldIT.java +++ b/x-pack/plugin/versionfield/src/internalClusterTest/java/org/elasticsearch/xpack/versionfield/VersionFieldIT.java @@ -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> nodePlugins() { - return org.elasticsearch.common.collect.List.of(VersionFieldPlugin.class, LocalStateCompositeXPackPlugin.class); + return Arrays.asList(VersionFieldPlugin.class, LocalStateCompositeXPackPlugin.class); + } + + @Override + protected Collection> 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); diff --git a/x-pack/plugin/versionfield/src/main/java/org/elasticsearch/xpack/versionfield/VersionFieldPlugin.java b/x-pack/plugin/versionfield/src/main/java/org/elasticsearch/xpack/versionfield/VersionFieldPlugin.java index 5ff66b714ef..94ff1d92641 100644 --- a/x-pack/plugin/versionfield/src/main/java/org/elasticsearch/xpack/versionfield/VersionFieldPlugin.java +++ b/x-pack/plugin/versionfield/src/main/java/org/elasticsearch/xpack/versionfield/VersionFieldPlugin.java @@ -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 getNamedWriteables() { - return org.elasticsearch.common.collect.List.of( + return Arrays.asList( new NamedWriteableRegistry.Entry( DocValueFormat.class, VersionStringFieldMapper.VERSION_DOCVALUE.getWriteableName(),