Class BasePipelineAggregationTestCase<AF extends AbstractPipelineAggregationBuilder<AF>>

java.lang.Object
org.junit.Assert
org.apache.lucene.tests.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.search.aggregations.BasePipelineAggregationTestCase<AF>

public abstract class BasePipelineAggregationTestCase<AF extends AbstractPipelineAggregationBuilder<AF>> extends ESTestCase
  • Field Details

  • Constructor Details

    • BasePipelineAggregationTestCase

      public BasePipelineAggregationTestCase()
  • Method Details

    • getCurrentTypes

      protected String[] getCurrentTypes()
    • createTestAggregatorFactory

      protected abstract AF createTestAggregatorFactory()
    • setUp

      public void setUp() throws Exception
      Setup for the whole base test class.
      Overrides:
      setUp in class org.apache.lucene.tests.util.LuceneTestCase
      Throws:
      Exception
    • plugins

      protected List<SearchPlugin> plugins()
      Plugins to add to the test.
    • additionalNamedWriteables

      protected List<NamedWriteableRegistry.Entry> additionalNamedWriteables()
      Any extra named writeables required not registered by SearchModule
    • additionalNamedContents

      protected List<org.elasticsearch.xcontent.NamedXContentRegistry.Entry> additionalNamedContents()
      Any extra named xcontents required not registered by SearchModule
    • testFromXContent

      public void testFromXContent() throws IOException
      Generic test that creates new AggregatorFactory from the test AggregatorFactory and checks both for equality and asserts equality on the two queries.
      Throws:
      IOException
    • parse

      protected PipelineAggregationBuilder parse(org.elasticsearch.xcontent.XContentParser parser) throws IOException
      Throws:
      IOException
    • testSerialization

      public void testSerialization() throws IOException
      Test serialization and deserialization of the test AggregatorFactory.
      Throws:
      IOException
    • testEqualsAndHashcode

      public void testEqualsAndHashcode() throws IOException
      Throws:
      IOException
    • getRandomTypes

      protected String[] getRandomTypes()
    • randomNumericField

      public String randomNumericField()
    • xContentRegistry

      protected org.elasticsearch.xcontent.NamedXContentRegistry xContentRegistry()
      Description copied from class: ESTestCase
      The NamedXContentRegistry to use for this test. Subclasses should override and use liberally.
      Overrides:
      xContentRegistry in class ESTestCase
    • validate

      protected String validate(AggregationBuilder parent, AF builder)
      Helper for testing validation.
    • validate

      protected String validate(Collection<AggregationBuilder> siblingAggregations, AF builder)
      Helper for testing validation.
    • validate

      protected String validate(Collection<AggregationBuilder> siblingAggregations, Collection<PipelineAggregationBuilder> siblingPipelineAggregations, AF builder)
      Helper for testing validation.
    • validate

      protected String validate(PipelineAggregationBuilder.ValidationContext context, AF builder)
      Helper for testing validation.