public abstract class AbstractTestBase extends TestBaseUtils
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();
}
TestBaseUtils.TupleComparator<T extends org.apache.flink.api.java.tuple.Tuple>| Modifier and Type | Field and Description |
|---|---|
static MiniClusterWithClientResource |
miniClusterResource |
static org.junit.rules.TemporaryFolder |
TEMPORARY_FOLDER |
DEFAULT_AKKA_ASK_TIMEOUT, DEFAULT_AKKA_STARTUP_TIMEOUT, DEFAULT_HTTP_TIMEOUT, DEFAULT_TIMEOUT, logDir, MINIMUM_HEAP_SIZE_MB, TASK_MANAGER_MEMORY_SIZE| Constructor and Description |
|---|
AbstractTestBase() |
| Modifier and Type | Method and Description |
|---|---|
File |
createAndRegisterTempFile(String fileName) |
String |
createTempFile(String fileName,
String contents) |
String |
getTempDirPath(String dirName) |
String |
getTempFilePath(String fileName) |
asFile, checkLinesAgainstRegexp, compareKeyValuePairsWithDelta, compareKeyValuePairsWithDelta, compareOrderedResultAsText, compareOrderedResultAsText, compareResultAsText, compareResultAsTuples, compareResultCollections, compareResultsByLinesInMemory, compareResultsByLinesInMemory, compareResultsByLinesInMemoryWithStrictOrder, compareResultsByLinesInMemoryWithStrictOrder, constructTestPath, constructTestURI, containsResultAsText, deleteRecursively, getFromHTTP, getFromHTTP, getResultInputStream, getResultInputStream, getResultReader, getResultReader, readAllResultLines, readAllResultLines, readAllResultLines, setEnv, toParameterList, toParameterListpublic static MiniClusterWithClientResource miniClusterResource
public static final org.junit.rules.TemporaryFolder TEMPORARY_FOLDER
public String getTempDirPath(String dirName) throws IOException
IOExceptionpublic String getTempFilePath(String fileName) throws IOException
IOExceptionpublic String createTempFile(String fileName, String contents) throws IOException
IOExceptionpublic File createAndRegisterTempFile(String fileName) throws IOException
IOExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.