Package org.apache.flink.test.util
Class MultipleProgramsTestBaseJUnit4
java.lang.Object
org.apache.flink.util.TestLogger
org.apache.flink.test.util.AbstractTestBaseJUnit4
org.apache.flink.test.util.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 ExecutionEnvironment from the context:
{@literal @}Test
public void someTest() {
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
// test code
env.execute();
}
{@literal @}Test
public void anotherTest() {
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
// test code
env.execute();
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDeprecated.Enum that defines which execution environment to run the next test on: An embedded local flink cluster, or the collection execution backend. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final MultipleProgramsTestBaseJUnit4.TestExecutionModeDeprecated.Fields inherited from class org.apache.flink.test.util.AbstractTestBaseJUnit4
MINI_CLUSTER_RESOURCE, TEMPORARY_FOLDERFields inherited from class org.apache.flink.util.TestLogger
log, nameProvider, watchman -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<Object[]>Deprecated.voidDeprecated.voidDeprecated.Methods inherited from class org.apache.flink.test.util.AbstractTestBaseJUnit4
cleanupRunningJobs, createAndRegisterTempFile, createTempFile, getTempDirPath, getTempFilePath
-
Field Details
-
mode
Deprecated.
-
-
Constructor Details
-
MultipleProgramsTestBaseJUnit4
Deprecated.
-
-
Method Details
-
setupEnvironment
public void setupEnvironment()Deprecated. -
teardownEnvironment
public void teardownEnvironment()Deprecated. -
executionModes
Deprecated.
-
MultipleProgramsTestBaseinstead.