Package org.apache.flink.test.util
Class JavaProgramTestBase
- java.lang.Object
-
- org.apache.flink.test.util.AbstractTestBase
-
- org.apache.flink.test.util.JavaProgramTestBase
-
public abstract class JavaProgramTestBase extends AbstractTestBase
Base class for unit tests that run a single test with object reuse enabled/disabled and against collection environments.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()
.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.test.util.AbstractTestBase
MINI_CLUSTER_EXTENSION, temporaryFolder
-
-
Constructor Summary
Constructors Constructor Description JavaProgramTestBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description JobExecutionResult
getLatestExecutionResult()
int
getParallelism()
boolean
isCollectionExecution()
protected void
postSubmit()
protected void
preSubmit()
void
setNumberOfTestRepetitions(int numberOfTestRepetitions)
protected boolean
skipCollectionExecution()
void
testJobWithObjectReuse()
void
testJobWithoutObjectReuse()
protected abstract JobExecutionResult
testProgram()
-
Methods inherited from class org.apache.flink.test.util.AbstractTestBase
cleanupRunningJobs, createAndRegisterTempFile, createTempFile, getTempDirPath, getTempFilePath
-
-
-
-
Method Detail
-
setNumberOfTestRepetitions
public void setNumberOfTestRepetitions(int numberOfTestRepetitions)
-
getParallelism
public int getParallelism()
-
getLatestExecutionResult
public JobExecutionResult getLatestExecutionResult()
-
isCollectionExecution
public boolean isCollectionExecution()
-
testProgram
protected abstract JobExecutionResult testProgram() throws Exception
- Throws:
Exception
-
skipCollectionExecution
protected boolean skipCollectionExecution()
-
testJobWithObjectReuse
@Test public void testJobWithObjectReuse() throws Exception
- Throws:
Exception
-
-