Skip to content

Commit

Permalink
[7.x] Convert module/mappers-extra to an internal cluster test (#65971)…
Browse files Browse the repository at this point in the history
… (#66028)

modules/mappers-extra should be an internal cluster, not
a javaRestTest. This test will work correctly until you
you try to modify the javaRestTest test cluster. Then
it will treat the javaRestTest as an external cluster
to it's own test cluster potentially causing issues with
tests.
  • Loading branch information
jakelandis authored Dec 8, 2020
1 parent 4c9b9b8 commit 7dfb1ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/mapper-extras/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/
apply plugin: 'elasticsearch.yaml-rest-test'
apply plugin: 'elasticsearch.java-rest-test'
apply plugin: 'elasticsearch.internal-cluster-test'

esplugin {
description 'Adds advanced field mappers'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.aggregations.AggregationBuilders;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
Expand All @@ -37,6 +38,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;

import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
Expand Down Expand Up @@ -66,6 +68,11 @@ public TokenCountFieldMapperIntegrationIT(@Name("storeCountedFields") boolean st
this.loadCountedFields = loadCountedFields;
}

@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return Arrays.asList(MapperExtrasPlugin.class);
}

/**
* It is possible to get the token count in a search response.
*/
Expand Down

0 comments on commit 7dfb1ed

Please sign in to comment.