public class MultipleProgramsTestBase 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 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 static org.apache.flink.runtime.minicluster.LocalFlinkMiniCluster |
cluster |
protected static int |
DEFAULT_PARALLELISM |
protected MultipleProgramsTestBase.TestExecutionMode |
mode |
protected static boolean |
startWebServer |
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() |
static void |
setup() |
void |
setupEnvironment() |
static void |
teardown() |
void |
teardownEnvironment() |
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, startCluster, startCluster, stopCluster, toParameterList, toParameterList
protected static final int DEFAULT_PARALLELISM
protected static boolean startWebServer
protected static org.apache.flink.runtime.minicluster.LocalFlinkMiniCluster cluster
protected final MultipleProgramsTestBase.TestExecutionMode mode
public MultipleProgramsTestBase(MultipleProgramsTestBase.TestExecutionMode mode)
public void setupEnvironment()
public void teardownEnvironment()
public static Collection<Object[]> executionModes()
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.