Interface TestEnvironment

    • Method Detail

      • createExecutionEnvironment

        org.apache.flink.streaming.api.environment.StreamExecutionEnvironment createExecutionEnvironment​(TestEnvironmentSettings envOptions)
        Get an instance of 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.

        Parameters:
        envOptions - options for the environment to satisfy
      • getRestEndpoint

        TestEnvironment.Endpoint getRestEndpoint()
        Get endpoint of the test environment for connecting via REST API.
      • getCheckpointUri

        String getCheckpointUri()
        Get a path in string for storing checkpoint and savepoint in the test environment.

        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.