Jiabao-Sun commented on code in PR #24180:
URL: https://github.com/apache/flink/pull/24180#discussion_r1467200868


##########
flink-connectors/flink-connector-base/src/test/java/org/apache/flink/connector/base/sink/writer/TestSinkInitContext.java:
##########
@@ -48,7 +48,7 @@
 import java.util.concurrent.ScheduledFuture;
 
 /** A mock implementation of a {@code Sink.InitContext} to be used in sink 
unit tests. */
-public class TestSinkInitContext implements Sink.InitContext {
+public class TestSinkInitContext implements WriterInitContext {

Review Comment:
   ```java
       @Deprecated
       SinkWriter<InputT> createWriter(InitContext context) throws IOException;
   
       default SinkWriter<InputT> createWriter(WriterInitContext context) 
throws IOException {
           return createWriter(new InitContextWrapper(context));
       }
   ```
   
   ```java
   TestSinkInitContext initContext = new TestSinkInitContext();
   SinkWriter writer = sink.createWriter(initContext);
   ```
   
   One solution is to not directly construct a Writer through 
TestSinkInitContext, but instead use Sink.createWriter() to create a Writer. 
   So there is no need to revert it change. 
   Sorry for the disturbance.
   



-- 
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