Package org.apache.flink.test.util
Class JavaProgramTestBase
java.lang.Object
org.apache.flink.test.util.AbstractTestBase
org.apache.flink.test.util.JavaProgramTestBase
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 -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.flink.api.common.JobExecutionResultintbooleanprotected voidprotected voidvoidsetNumberOfTestRepetitions(int numberOfTestRepetitions) protected booleanvoidvoidprotected abstract org.apache.flink.api.common.JobExecutionResultMethods inherited from class org.apache.flink.test.util.AbstractTestBase
cleanupRunningJobs, createAndRegisterTempFile, createTempFile, getTempDirPath, getTempFilePath
-
Constructor Details
-
JavaProgramTestBase
public JavaProgramTestBase()
-
-
Method Details
-
setNumberOfTestRepetitions
public void setNumberOfTestRepetitions(int numberOfTestRepetitions) -
getParallelism
public int getParallelism() -
getLatestExecutionResult
public org.apache.flink.api.common.JobExecutionResult getLatestExecutionResult() -
isCollectionExecution
public boolean isCollectionExecution() -
testProgram
- Throws:
Exception
-
preSubmit
- Throws:
Exception
-
postSubmit
- Throws:
Exception
-
skipCollectionExecution
protected boolean skipCollectionExecution() -
testJobWithObjectReuse
- Throws:
Exception
-
testJobWithoutObjectReuse
- Throws:
Exception
-