Hi I would recommend to use kafka-junit5 from salesforce https://github.com/salesforce/kafka-junit On top of that, you can use org.apache.flink.runtime.minicluster.TestingMiniCluster
Your stack should be complete. Cheers Le jeu. 21 avr. 2022 à 07:10, Aeden Jameson <aeden.jame...@gmail.com> a écrit : > I've had success using Kafka for Junit, > https://github.com/mguenther/kafka-junit, for these kinds of tests. > > On Wed, Apr 20, 2022 at 3:01 PM Alexey Trenikhun <yen...@msn.com> wrote: > > > > Hello, > > We have Flink job that read data from multiple Kafka topics, transforms > data and write in output Kafka topics. We want write integration test for > it. I've looked at KafkaTableITCase, we can do similar setup of Kafka > topics, prepopulate data but since in our case it is endless stream, we > need after some timeout (or condition on output topics) stop the job. > Should we run 'env.execute("Job");` on background thread and then in main > thread wait and then interrupt background thread? Or maybe there is > dedicated method to stop/cancel job when needed. Are there better examples > of Integration Tests for jobs with endless stream? > > > > Thanks, > > Alexey > > > > -- > Cheers, > Aeden > > GitHub: https://github.com/aedenj > Linked In: http://www.linkedin.com/in/aedenjameson >