Package org.apache.flink.test.util
Class AbstractTestBaseJUnit4
java.lang.Object
org.apache.flink.util.TestLogger
org.apache.flink.test.util.AbstractTestBaseJUnit4
- Direct Known Subclasses:
JavaProgramTestBaseJUnit4,MultipleProgramsTestBaseJUnit4
Deprecated.
Base class for unit tests that run multiple tests and want to reuse the same Flink cluster. This
saves a significant amount of time, since the startup and shutdown of the Flink clusters
(including actor systems, etc) usually dominates the execution of the actual tests.
To write a unit test against this test base, simply extend it and add one or more regular test methods and retrieve the StreamExecutionEnvironment from the context:
@Test
public void someTest() {
ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
// test code
env.execute();
}
@Test
public void anotherTest() {
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
// test code
env.execute();
}
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MiniClusterWithClientResourceDeprecated.static final org.junit.rules.TemporaryFolderDeprecated.Fields inherited from class org.apache.flink.util.TestLogger
log, nameProvider, watchman -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidDeprecated.createAndRegisterTempFile(String fileName) Deprecated.createTempFile(String fileName, String contents) Deprecated.getTempDirPath(String dirName) Deprecated.getTempFilePath(String fileName) Deprecated.
-
Field Details
-
MINI_CLUSTER_RESOURCE
Deprecated. -
TEMPORARY_FOLDER
public static final org.junit.rules.TemporaryFolder TEMPORARY_FOLDERDeprecated.
-
-
Constructor Details
-
AbstractTestBaseJUnit4
public AbstractTestBaseJUnit4()Deprecated.
-
-
Method Details
-
cleanupRunningJobs
Deprecated.- Throws:
Exception
-
getTempDirPath
Deprecated.- Throws:
IOException
-
getTempFilePath
Deprecated.- Throws:
IOException
-
createTempFile
Deprecated.- Throws:
IOException
-
createAndRegisterTempFile
Deprecated.- Throws:
IOException
-
AbstractTestBaseinstead.