Skip to content

Commit 530a85d

Browse files
authored
Disable exponential histogram mapper tests when running release tests (#133297)
1 parent b3c95cd commit 530a85d

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import org.elasticsearch.plugins.Plugin;
1818
import org.elasticsearch.xcontent.XContentBuilder;
1919
import org.junit.AssumptionViolatedException;
20+
import org.junit.Before;
2021

2122
import java.io.IOException;
2223
import java.util.ArrayList;
@@ -39,6 +40,14 @@
3940

4041
public class ExponentialHistogramFieldMapperTests extends MapperTestCase {
4142

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

x-pack/plugin/mapper-exponential-histogram/src/yamlRestTest/java/org/elasticsearch/xpack/exponentialhistogram/ExponentialHistogramYamlTestSuiteIT.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
import com.carrotsearch.randomizedtesting.annotations.Name;
1111
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
1212

13+
import org.elasticsearch.Build;
1314
import org.elasticsearch.test.cluster.ElasticsearchCluster;
1415
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
1516
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
17+
import org.junit.Before;
1618
import org.junit.ClassRule;
1719

1820
public class ExponentialHistogramYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
@@ -21,6 +23,12 @@ public ExponentialHistogramYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate
2123
super(testCandidate);
2224
}
2325

26+
@Before
27+
public void setup() {
28+
// TODO: remove when FeatureFlag is removed and add minimum required version to yaml spec
29+
assumeTrue("Only when exponential_histogram feature flag is enabled", Build.current().isSnapshot());
30+
}
31+
2432
@ParametersFactory
2533
public static Iterable<Object[]> parameters() throws Exception {
2634
return ESClientYamlSuiteTestCase.createParameters();

0 commit comments

Comments
 (0)