Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.xcontent.XContentBuilder;
import org.junit.AssumptionViolatedException;
import org.junit.Before;

import java.io.IOException;
import java.util.ArrayList;
Expand All @@ -39,6 +40,14 @@

public class ExponentialHistogramFieldMapperTests extends MapperTestCase {

@Before
public void setup() {
assumeTrue(
"Only when exponential_histogram feature flag is enabled",
ExponentialHistogramFieldMapper.EXPONENTIAL_HISTOGRAM_FEATURE.isEnabled()
);
}

protected Collection<? extends Plugin> getPlugins() {
return Collections.singletonList(new ExponentialHistogramMapperPlugin());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;

import org.elasticsearch.Build;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.junit.Before;
import org.junit.ClassRule;

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

@Before
public void setup() {
// TODO: remove when FeatureFlag is removed and add minimum required version to yaml spec
assumeTrue("Only when exponential_histogram feature flag is enabled", Build.current().isSnapshot());
}

@ParametersFactory
public static Iterable<Object[]> parameters() throws Exception {
return ESClientYamlSuiteTestCase.createParameters();
Expand Down