flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GJL <...@git.apache.org>
Subject [GitHub] flink pull request #5193: [FLINK-8268][tests] Improve tests stability
Date Mon, 01 Jan 2018 12:02:37 GMT
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);`


---

Mime
View raw message