Skip to content

Commit 7267848

Browse files
committed
Only run tests if feature flag is enabled
1 parent f44289d commit 7267848

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import org.elasticsearch.xcontent.XContentParser;
2424
import org.elasticsearch.xcontent.XContentParserConfiguration;
2525
import org.elasticsearch.xcontent.json.JsonXContent;
26+
import org.elasticsearch.xpack.analytics.mapper.ExponentialHistogramParser;
27+
import org.junit.Before;
2628

2729
import java.io.IOException;
2830
import java.util.Collection;
@@ -38,6 +40,14 @@ public ExponentialHistogramFieldBlockLoaderTests(Params params) {
3840
super(ExponentialHistogramFieldMapper.CONTENT_TYPE, List.of(DATA_SOURCE_HANDLER), params);
3941
}
4042

43+
@Before
44+
public void setup() {
45+
assumeTrue(
46+
"Only when exponential_histogram feature flag is enabled",
47+
ExponentialHistogramParser.EXPONENTIAL_HISTOGRAM_FEATURE.isEnabled()
48+
);
49+
}
50+
4151
@Override
4252
protected Collection<? extends Plugin> getPlugins() {
4353
return Collections.singletonList(new ExponentialHistogramMapperPlugin());

0 commit comments

Comments
 (0)