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.
|
Modifier and Type | Field and Description |
---|---|
protected MultipleProgramsTestBase.TestExecutionMode |
mode |
MINI_CLUSTER_RESOURCE, TEMPORARY_FOLDER
log, nameProvider, watchman
Constructor and Description |
---|
MultipleProgramsTestBase(MultipleProgramsTestBase.TestExecutionMode mode) |
Modifier and Type | Method and Description |
---|---|
static Collection<Object[]> |
executionModes() |
void |
setupEnvironment() |
void |
teardownEnvironment() |
cleanupRunningJobs, createAndRegisterTempFile, createTempFile, getTempDirPath, getTempFilePath
protected final MultipleProgramsTestBase.TestExecutionMode mode
public MultipleProgramsTestBase(MultipleProgramsTestBase.TestExecutionMode mode)
public void setupEnvironment()
public void teardownEnvironment()
public static Collection<Object[]> executionModes()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.