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 public abstract class AbstractTestBaseJUnit4 extends TestLogger
Deprecated.UseAbstractTestBase
instead.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
Fields Modifier and Type Field Description static MiniClusterWithClientResource
MINI_CLUSTER_RESOURCE
Deprecated.static org.junit.rules.TemporaryFolder
TEMPORARY_FOLDER
Deprecated.-
Fields inherited from class org.apache.flink.util.TestLogger
log, nameProvider, watchman
-
-
Constructor Summary
Constructors Constructor Description AbstractTestBaseJUnit4()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
cleanupRunningJobs()
Deprecated.File
createAndRegisterTempFile(String fileName)
Deprecated.String
createTempFile(String fileName, String contents)
Deprecated.String
getTempDirPath(String dirName)
Deprecated.String
getTempFilePath(String fileName)
Deprecated.
-
-
-
Field Detail
-
MINI_CLUSTER_RESOURCE
public static final MiniClusterWithClientResource MINI_CLUSTER_RESOURCE
Deprecated.
-
TEMPORARY_FOLDER
public static final org.junit.rules.TemporaryFolder TEMPORARY_FOLDER
Deprecated.
-
-
Method Detail
-
cleanupRunningJobs
public final void cleanupRunningJobs() throws Exception
Deprecated.- Throws:
Exception
-
getTempDirPath
public String getTempDirPath(String dirName) throws IOException
Deprecated.- Throws:
IOException
-
getTempFilePath
public String getTempFilePath(String fileName) throws IOException
Deprecated.- Throws:
IOException
-
createTempFile
public String createTempFile(String fileName, String contents) throws IOException
Deprecated.- Throws:
IOException
-
createAndRegisterTempFile
public File createAndRegisterTempFile(String fileName) throws IOException
Deprecated.- Throws:
IOException
-
-