Class DataProviderUtils

java.lang.Object
com.linkedin.venice.utils.DataProviderUtils

public class DataProviderUtils extends Object
This class gathers all common data provider patterns in test cases. In order to leverage this util class, make sure your test case has "test" dependency on "venice-test-common" module.
  • Field Details

    • BOOLEAN

      public static final Object[] BOOLEAN
    • BOOLEAN_FALSE

      public static final Object[] BOOLEAN_FALSE
    • COMPRESSION_STRATEGIES

      public static final Object[] COMPRESSION_STRATEGIES
    • PARTITION_COUNTS

      public static final Object[] PARTITION_COUNTS
    • CHECKSUM_TYPES

      public static final Object[] CHECKSUM_TYPES
  • Constructor Details

    • DataProviderUtils

      public DataProviderUtils()
  • Method Details

    • trueAndFalseProvider

      @DataProvider(name="True-and-False") public static Object[][] trueAndFalseProvider()
      To use these data providers, add (dataProvider = "", dataProviderClass = DataProviderUtils.class) into the @Test annotation.
    • compressionProvider

      @DataProvider(name="Compression-Strategies") public static Object[][] compressionProvider()
    • twoBoolean

      @DataProvider(name="Two-True-and-False") public static Object[][] twoBoolean()
    • threeBoolean

      @DataProvider(name="Three-True-and-False") public static Object[][] threeBoolean()
    • fourBoolean

      @DataProvider(name="Four-True-and-False") public static Object[][] fourBoolean()
    • fiveBoolean

      @DataProvider(name="Five-True-and-False") public static Object[][] fiveBoolean()
    • checkpointingSupportedCheckSumTypes

      @DataProvider(name="CheckpointingSupported-CheckSum-Types") public static Object[][] checkpointingSupportedCheckSumTypes()
    • daVinciConfigProvider

      @DataProvider(name="dv-client-config-provider") public static Object[][] daVinciConfigProvider()
    • changelogConsumer

      @DataProvider(name="changelogConsumer") public static Object[][] changelogConsumer()
    • isolatedIngestion

      @DataProvider(name="Isolated-Ingestion") public static Object[][] isolatedIngestion()
    • chunkingAndPartitionCountsCombination

      @DataProvider(name="Chunking-And-Partition-Counts") public static Object[][] chunkingAndPartitionCountsCombination()
    • booleanCompression

      @DataProvider(name="Boolean-Compression") public static Object[][] booleanCompression()
    • booleanBooleanCompression

      @DataProvider(name="Boolean-Boolean-Compression") public static Object[][] booleanBooleanCompression()
    • booleanChecksumType

      @DataProvider(name="Boolean-Checksum") public static Object[][] booleanChecksumType()
    • allAvroTypesExceptNullAndUnion

      @DataProvider(name="All-Avro-Schemas-Except-Null-And-Union") public static Object[][] allAvroTypesExceptNullAndUnion()
    • allPermutationGenerator

      public static Object[][] allPermutationGenerator(Object[]... parameterSets)
      Generate permutations to be fed to a DataProvider. For two boolean's we'd pass in allPermutationGenerator(BOOLEAN, BOOLEAN)
      Parameters:
      parameterSets - Sets of valid values for each parameter
      Returns:
      the permutations that can be returned from a DataProvider
    • allPermutationGenerator

      public static Object[][] allPermutationGenerator(Function<Object[],Boolean> permutationValidator, Object[]... parameterSets)
      Generate permutations to be fed to a DataProvider. For two boolean's we'd pass in allPermutationGenerator(BOOLEAN, BOOLEAN)
      Parameters:
      parameterSets - Sets of valid values for each parameter
      permutationValidator - A function that takes the permutation as an input and decides if it is valid
      Returns:
      the permutations that can be returned from a DataProvider