GJL commented on a change in pull request #6915: [FLINK-10663][streaming] Fix 
NPE when StreamingFileSink is closed without initialization.
URL: https://github.com/apache/flink/pull/6915#discussion_r227751210
 
 

 ##########
 File path: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/functions/sink/filesystem/LocalStreamingFileSinkTest.java
 ##########
 @@ -59,6 +59,17 @@ public void testClosingWithoutInput() throws Exception {
                }
        }
 
+       @Test
+       public void testClosingWithoutOpenShouldNotFail() throws Exception {
+               final File outDir = TEMP_FOLDER.newFolder();
+
+               try (OneInputStreamOperatorTestHarness<Tuple2<String, Integer>, 
Object> testHarness =
+                                TestUtils.createRescalingTestSink(outDir, 1, 
0, 100L, 124L)
+               ) {
+                       testHarness.setup();
+               }
+       }
+
 
 Review comment:
   Renamed. I'd keep `try-with-resource` to avoid potential problems with 
static code analyzers.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to