Aljoscha Krettek created FLINK-19123:
----------------------------------------
Summary: TestStreamEnvironment does not use shared MiniCluster for executeAsync()
Key: FLINK-19123
URL:
https://issues.apache.org/jira/browse/FLINK-19123 Project: Flink
Issue Type: Bug
Components: API / DataStream, Runtime / Coordination, Tests
Reporter: Aljoscha Krettek
TestStreamEnvironment does override {{execute()}} but not {{executeAsync()}} . Now, {{execute()}} goes against the {{MiniCluster}} session that was started by a {{MiniClusterWithClientResource}} or some other method that uses {{TestStreamEnvironment}}. However, {{executeAsync()}} will go through the normal {{StreamExecutionEnvironment}} logic and tries to find an executor, does not know that it is a testing environment.
Up until recently, you would have gotten an exception that tells you that no executor is configured, then we would have found out that we need to override {{executeAsync()}} in {{TestStreamEnvironment}}. However, we currently configure a local executor in the constructor: [
https://github.com/apache/flink/blob/2160c3294ef87143ab9a4e8138cb618651499792/flink-test-utils-parent/flink-test-utils/src/main/java/org/apache/flink/streaming/util/TestStreamEnvironment.java#L59]. With this, you basically get the “local environment” behaviour when you call {{executeAsync()}}, which starts a cluster for the job and shuts it down when the job finishes. This basically makes the {{TestStreamEnvironment}} cluster sharing useless.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)