public class MultipleProgramsTestBase extends AbstractTestBase
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() {
ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
// test code
env.execute();
}
{@literal @}Test
public void anotherTest() {
ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
// test code
env.execute();
}
Modifier and Type | Class and Description |
---|---|
static class |
MultipleProgramsTestBase.TestExecutionMode
Enum that defines which execution environment to run the next test on: An embedded local
flink cluster, or the collection execution backend.
|
TestBaseUtils.TupleComparator<T extends Tuple>
Modifier and Type | Field and Description |
---|---|
protected MultipleProgramsTestBase.TestExecutionMode |
mode |
miniClusterResource, TEMPORARY_FOLDER
DEFAULT_AKKA_ASK_TIMEOUT, DEFAULT_AKKA_STARTUP_TIMEOUT, DEFAULT_HTTP_TIMEOUT, DEFAULT_TIMEOUT, logDir, MINIMUM_HEAP_SIZE_MB, TASK_MANAGER_MEMORY_SIZE
log, watchman
Constructor and Description |
---|
MultipleProgramsTestBase(MultipleProgramsTestBase.TestExecutionMode mode) |
Modifier and Type | Method and Description |
---|---|
static Collection<Object[]> |
executionModes() |
void |
setupEnvironment() |
void |
teardownEnvironment() |
createAndRegisterTempFile, createTempFile, getTempDirPath, getTempFilePath
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, toParameterList
protected final MultipleProgramsTestBase.TestExecutionMode mode
public MultipleProgramsTestBase(MultipleProgramsTestBase.TestExecutionMode mode)
public void setupEnvironment()
public void teardownEnvironment()
public static Collection<Object[]> executionModes()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.