Package com.linkedin.venice.utils
Class DataProviderUtils
- java.lang.Object
-
- com.linkedin.venice.utils.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 Summary
Fields Modifier and Type Field Description static java.lang.Object[]
BOOLEAN
static java.lang.Object[]
BOOLEAN_FALSE
static java.lang.Object[]
CHECKSUM_TYPES
static java.lang.Object[]
COMPRESSION_STRATEGIES
static java.lang.Object[]
PARTITION_COUNTS
-
Constructor Summary
Constructors Constructor Description DataProviderUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Object[][]
allAvroTypesExceptNullAndUnion()
static java.lang.Object[][]
allPermutationGenerator(java.lang.Object[]... parameterSets)
Generate permutations to be fed to a DataProvider.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.static java.lang.Object[][]
booleanBooleanCompression()
static java.lang.Object[][]
booleanChecksumType()
static java.lang.Object[][]
booleanCompression()
static java.lang.Object[][]
changelogConsumer()
static java.lang.Object[][]
checkpointingSupportedCheckSumTypes()
static java.lang.Object[][]
chunkingAndPartitionCountsCombination()
static java.lang.Object[][]
compressionProvider()
static java.lang.Object[][]
daVinciConfigProvider()
static java.lang.Object[][]
fiveBoolean()
static java.lang.Object[][]
fourBoolean()
static java.lang.Object[][]
isolatedIngestion()
static java.lang.Object[][]
threeBoolean()
static java.lang.Object[][]
trueAndFalseProvider()
To use these data providers, add (dataProvider = "", dataProviderClass = DataProviderUtils.class) into the @Test annotation. static java.lang.Object[][]
twoBoolean()
-
-
-
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
-
CHECKSUM_TYPES
public static final java.lang.Object[] CHECKSUM_TYPES
-
-
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()
-
checkpointingSupportedCheckSumTypes
@DataProvider(name="CheckpointingSupported-CheckSum-Types") public static java.lang.Object[][] checkpointingSupportedCheckSumTypes()
-
daVinciConfigProvider
@DataProvider(name="dv-client-config-provider") public static java.lang.Object[][] daVinciConfigProvider()
-
changelogConsumer
@DataProvider(name="changelogConsumer") public static java.lang.Object[][] changelogConsumer()
-
isolatedIngestion
@DataProvider(name="Isolated-Ingestion") public static java.lang.Object[][] isolatedIngestion()
-
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()
-
booleanChecksumType
@DataProvider(name="Boolean-Checksum") public static java.lang.Object[][] booleanChecksumType()
-
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 parameterpermutationValidator
- 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
-
-