Class DataProviderUtils


  • public class DataProviderUtils
    extends java.lang.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 Detail

      • BOOLEAN

        public static final java.lang.Object[] BOOLEAN
      • BOOLEAN_FALSE

        public static final java.lang.Object[] BOOLEAN_FALSE
      • COMPRESSION_STRATEGIES

        public static final java.lang.Object[] COMPRESSION_STRATEGIES
      • PARTITION_COUNTS

        public static final java.lang.Object[] PARTITION_COUNTS
    • Constructor Detail

      • DataProviderUtils

        public DataProviderUtils()
    • Method Detail

      • trueAndFalseProvider

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

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

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

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

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

        @DataProvider(name="Five-True-and-False")
        public static java.lang.Object[][] fiveBoolean()
      • daVinciConfigProvider

        @DataProvider(name="dv-client-config-provider")
        public static java.lang.Object[][] daVinciConfigProvider()
      • amplificationFactorAndObjectCacheConfigProvider

        @DataProvider(name="AmplificationFactor-and-ObjectCache",
                      parallel=false)
        public static java.lang.Object[][] amplificationFactorAndObjectCacheConfigProvider()
      • isolatedIngestion

        @DataProvider(name="Isolated-Ingestion")
        public static java.lang.Object[][] isolatedIngestion()
      • amplificationFactor

        @DataProvider(name="Amplification-Factor")
        public static java.lang.Object[][] amplificationFactor()
      • chunkingAndPartitionCountsCombination

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

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

        @DataProvider(name="Boolean-Boolean-Compression")
        public static java.lang.Object[][] booleanBooleanCompression()
      • allAvroTypesExceptNullAndUnion

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

        public static java.lang.Object[][] allPermutationGenerator​(java.lang.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 java.lang.Object[][] allPermutationGenerator​(java.util.function.Function<java.lang.Object[],​java.lang.Boolean> permutationValidator,
                                                                   java.lang.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