@Experimental public interface TestEnvironment extends TestResource
The environment is bound with a Flink cluster, such as MiniCluster, Flink on container, or even a running session cluster.
Modifier and Type | Interface and Description |
---|---|
static class |
TestEnvironment.Endpoint
Endpoint with address and port of the test environment.
|
Modifier and Type | Method and Description |
---|---|
StreamExecutionEnvironment |
createExecutionEnvironment(TestEnvironmentSettings envOptions)
Get an instance of
StreamExecutionEnvironment for building and executing Flink jobs
based on the provided configuration. |
String |
getCheckpointUri()
Get a path in string for storing checkpoint and savepoint in the test environment.
|
TestEnvironment.Endpoint |
getRestEndpoint()
Get endpoint of the test environment for connecting via REST API.
|
startUp, tearDown
StreamExecutionEnvironment createExecutionEnvironment(TestEnvironmentSettings envOptions)
StreamExecutionEnvironment
for building and executing Flink jobs
based on the provided configuration.
Note that this environment should be bound with the Flink cluster, because this will be
the entrypoint to submit Flink jobs (via StreamExecutionEnvironment.execute()
) in
test cases.
envOptions
- options for the environment to satisfyTestEnvironment.Endpoint getRestEndpoint()
String getCheckpointUri()
Note that testing framework may have no access to this storage (e.g. Flink cluster is on some cloud service and testing framework is executed locally). In test cases for testing failover scenario, this path will be passed to cluster client directly for triggering checkpoint / savepoint in this path and recovering from checkpoint / savepoint stored under this path.
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.