Hi Bin, We could try the following method to cover the source/sink test. Unit test: To verify whether the behavior of each method in custom source or sink is expected. You could mock interactions with external storage (database, IO, etc.) in this part. Integration test: To test whether the source/sink could work well in a real Flink job. You need to verify whether the custom connector behavior could well work in a big picture, such as checkpoint, read/ write to external storage. You could find many UT/IT in the source code of Flink built-in connectors[1] .
[1] https://github.com/apache/flink/tree/master/flink-connectors Best, JING ZHANG Xinbin Huang <b...@apache.org> 于2021年8月10日周二 上午4:22写道: > Hi team, > > I'm currently implementing a custom source and sink, and I'm trying to > find a way to test these implementations. The testing section > <https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/datastream/testing/#unit-testing-stateful-or-timely-udfs--custom-operators> > in the official doc seems to only include testing for stateful/stateless > operators. Do you have any recommendations on how I should approach this? > > Thanks > Bin >