AHeise commented on a change in pull request #16373:
URL: https://github.com/apache/flink/pull/16373#discussion_r663853698



##########
File path: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/operators/sink/SinkWriterOperatorTestBase.java
##########
@@ -180,6 +181,17 @@ public void timeBasedBufferingSinkWriter() throws 
Exception {
                                 Tuple3.of(2, initialTime + 2, 
Long.MIN_VALUE).toString())));
     }
 
+    @Test
+    public void testSinkWriterIsClosedWhenDisposed() throws Exception {
+        final ClosingSinkWriter sinkWriter = new ClosingSinkWriter();
+        final OneInputStreamOperatorTestHarness<Integer, String> testHarness =
+                createTestHarness(
+                        
TestSink.newBuilder().withWriterState().setWriter(sinkWriter).build());
+        testHarness.open();
+        testHarness.dispose();

Review comment:
       Before that `assertFalse(sinkWriter.closed);`

##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/sink/AbstractSinkWriterOperator.java
##########
@@ -98,7 +98,7 @@ public void endInput() throws Exception {
     }
 
     @Override
-    public void close() throws Exception {
+    public void dispose() throws Exception {
         super.close();

Review comment:
       super.dispose!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to