|
32 | 32 |
|
33 | 33 | package org.opensearch.script.expression;
|
34 | 34 |
|
| 35 | +import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; |
| 36 | + |
35 | 37 | import org.opensearch.action.search.SearchPhaseExecutionException;
|
36 | 38 | import org.opensearch.action.search.SearchRequestBuilder;
|
37 | 39 | import org.opensearch.action.search.SearchResponse;
|
38 | 40 | import org.opensearch.action.search.SearchType;
|
39 | 41 | import org.opensearch.action.update.UpdateRequestBuilder;
|
40 | 42 | import org.opensearch.common.lucene.search.function.CombineFunction;
|
| 43 | +import org.opensearch.common.settings.Settings; |
| 44 | +import org.opensearch.common.util.FeatureFlags; |
41 | 45 | import org.opensearch.common.xcontent.XContentFactory;
|
42 | 46 | import org.opensearch.core.xcontent.XContentBuilder;
|
43 | 47 | import org.opensearch.index.query.QueryBuilders;
|
|
53 | 57 | import org.opensearch.search.aggregations.pipeline.SimpleValue;
|
54 | 58 | import org.opensearch.search.sort.SortBuilders;
|
55 | 59 | import org.opensearch.search.sort.SortOrder;
|
56 |
| -import org.opensearch.test.OpenSearchIntegTestCase; |
| 60 | +import org.opensearch.test.ParameterizedOpenSearchIntegTestCase; |
57 | 61 | import org.opensearch.test.hamcrest.OpenSearchAssertions;
|
58 | 62 |
|
| 63 | +import java.util.Arrays; |
59 | 64 | import java.util.Collection;
|
60 | 65 | import java.util.Collections;
|
61 | 66 | import java.util.HashMap;
|
|
64 | 69 |
|
65 | 70 | import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE;
|
66 | 71 | import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
|
| 72 | +import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING; |
67 | 73 | import static org.opensearch.search.aggregations.AggregationBuilders.histogram;
|
68 | 74 | import static org.opensearch.search.aggregations.AggregationBuilders.sum;
|
69 | 75 | import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.bucketScript;
|
|
74 | 80 | import static org.hamcrest.Matchers.notNullValue;
|
75 | 81 |
|
76 | 82 | // TODO: please convert to unit tests!
|
77 |
| -public class MoreExpressionIT extends OpenSearchIntegTestCase { |
| 83 | +public class MoreExpressionIT extends ParameterizedOpenSearchIntegTestCase { |
| 84 | + |
| 85 | + public MoreExpressionIT(Settings dynamicSettings) { |
| 86 | + super(dynamicSettings); |
| 87 | + } |
| 88 | + |
| 89 | + @ParametersFactory |
| 90 | + public static Collection<Object[]> parameters() { |
| 91 | + return Arrays.asList( |
| 92 | + new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), false).build() }, |
| 93 | + new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), true).build() } |
| 94 | + ); |
| 95 | + } |
| 96 | + |
| 97 | + @Override |
| 98 | + protected Settings featureFlagSettings() { |
| 99 | + return Settings.builder().put(super.featureFlagSettings()).put(FeatureFlags.CONCURRENT_SEGMENT_SEARCH, "true").build(); |
| 100 | + } |
78 | 101 |
|
79 | 102 | @Override
|
80 | 103 | protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
0 commit comments