You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GJL <gi...@git.apache.org> on 2018/01/01 12:02:37 UTC

[GitHub] flink pull request #5193: [FLINK-8268][tests] Improve tests stability

Github user GJL commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5193#discussion_r159154132
  
    --- Diff: flink-streaming-java/src/test/java/org/apache/flink/streaming/util/AbstractStreamOperatorTestHarness.java ---
    @@ -492,6 +503,10 @@ public void close() throws Exception {
     			processingTimeService.shutdownService();
     		}
     		setupCalled = false;
    +
    +		if (internalEnvironment.isPresent()) {
    --- End diff --
    
    I think to enable this `Environment` must implement `AutoCloseable` as well. Maybe an empty default `close()` method? 
    If you decide to stick with `Optional`, maybe change this line to: `internalEnvironment.ifPresent(MockEnvironment::close);`


---