[ 
https://issues.apache.org/jira/browse/FLINK-2508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14701175#comment-14701175
 ] 

Aljoscha Krettek commented on FLINK-2508:
-----------------------------------------

Another problem I discovered is that TestStreamEnvironment is "polluting" other 
tests. For example, in TranslationTest the test uses 
{{StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironment();}}. When I execute this 
standalone (or in an IDE) the call will return a LocalStreamEnvironment. When 
other tests are run before this they set some TestStreamEnvironment as context 
environment and then this call will pick up that TestStreamEnvironment. When 
this happens the execute call will also execute the leftover (lingering) 
operators from other tests. 

> Confusing sharing of StreamExecutionEnvironment
> -----------------------------------------------
>
>                 Key: FLINK-2508
>                 URL: https://issues.apache.org/jira/browse/FLINK-2508
>             Project: Flink
>          Issue Type: Bug
>          Components: Streaming
>    Affects Versions: 0.10
>            Reporter: Stephan Ewen
>            Assignee: Márton Balassi
>             Fix For: 0.10
>
>
> In the {{StreamExecutionEnvironment}}, the environment is once created and 
> then shared with a static variable to all successive calls to 
> {{getExecutionEnvironment()}}. But it can be overridden by calls to 
> {{createLocalEnvironment()}} and {{createRemoteEnvironment()}}.
> This seems a bit un-intuitive, and probably creates confusion when 
> dispatching multiple streaming jobs from within the same JVM.
> Why is it even necessary to cache the "current" execution environment?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to