Skip to content

Commit 5268271

Browse files
JonasKunzKubik42
authored andcommitted
Make exponential histogram aggregation tests check feature flag (elastic#136672)
1 parent 5fe1395 commit 5268271

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

x-pack/plugin/mapper-exponential-histogram/src/test/java/org/elasticsearch/xpack/exponentialhistogram/aggregations/metrics/ExponentialHistogramAggregatorTestCase.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,23 @@
1616
import org.elasticsearch.xpack.exponentialhistogram.ExponentialHistogramFieldMapper;
1717
import org.elasticsearch.xpack.exponentialhistogram.ExponentialHistogramMapperPlugin;
1818
import org.elasticsearch.xpack.exponentialhistogram.IndexWithCount;
19+
import org.junit.Before;
1920

2021
import java.io.IOException;
2122
import java.util.Arrays;
2223
import java.util.List;
2324
import java.util.stream.IntStream;
2425
import java.util.stream.Stream;
2526

27+
import static org.elasticsearch.xpack.exponentialhistogram.ExponentialHistogramFieldMapper.EXPONENTIAL_HISTOGRAM_FEATURE;
28+
2629
public abstract class ExponentialHistogramAggregatorTestCase extends AggregatorTestCase {
2730

31+
@Before
32+
public void setup() {
33+
assumeTrue("Only when exponential_histogram feature flag is enabled", EXPONENTIAL_HISTOGRAM_FEATURE.isEnabled());
34+
}
35+
2836
@Override
2937
protected List<SearchPlugin> getSearchPlugins() {
3038
return List.of(new ExponentialHistogramMapperPlugin());

0 commit comments

Comments
 (0)