public abstract class JavaProgramTestBase extends AbstractTestBase
To write a unit test against this test base, simply extend it and implement the testProgram()
method.
To skip the execution against collection environments you have to override skipCollectionExecution()
.
TestBaseUtils.TupleComparator<T extends Tuple>
MINI_CLUSTER_RESOURCE, TEMPORARY_FOLDER
DEFAULT_HTTP_TIMEOUT, logDir, MINIMUM_HEAP_SIZE_MB
log, nameProvider, watchman
Constructor and Description |
---|
JavaProgramTestBase() |
Modifier and Type | Method and Description |
---|---|
JobExecutionResult |
getLatestExecutionResult() |
int |
getParallelism() |
boolean |
isCollectionExecution() |
protected void |
postSubmit() |
protected void |
preSubmit() |
void |
setNumberOfTestRepetitions(int numberOfTestRepetitions) |
protected boolean |
skipCollectionExecution() |
void |
testJobCollectionExecution() |
void |
testJobWithObjectReuse() |
void |
testJobWithoutObjectReuse() |
protected abstract void |
testProgram() |
cleanupRunningJobs, createAndRegisterTempFile, createTempFile, getTempDirPath, getTempFilePath
asFile, checkLinesAgainstRegexp, compareKeyValuePairsWithDelta, compareKeyValuePairsWithDelta, compareOrderedResultAsText, compareResultAsText, compareResultAsTuples, compareResultCollections, compareResultsByLinesInMemory, compareResultsByLinesInMemory, compareResultsByLinesInMemoryWithStrictOrder, compareResultsByLinesInMemoryWithStrictOrder, constructTestPath, containsResultAsText, deleteRecursively, getFromHTTP, getFromHTTP, getResultReader, getResultReader, readAllResultLines, readAllResultLines, readAllResultLines, setEnv
public void setNumberOfTestRepetitions(int numberOfTestRepetitions)
public int getParallelism()
public JobExecutionResult getLatestExecutionResult()
public boolean isCollectionExecution()
protected boolean skipCollectionExecution()
public void testJobWithoutObjectReuse() throws Exception
Exception
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.