Re: Use of data generator source

2024-04-09 Thread Lasse Nedergaard
Hi TkachenkoYes I have and we use it extensively for unit testing. But we also have integration testing as part of our project and here I run into the problem.In my previous implementation I used SourceFunction interface and added a delay in the run function. but it’s depredicated so I have changed to the new Source interface and instead of implementing the interface I would like to use DataGeneratorSource. Med venlig hilsen / Best regardsLasse NedergaardDen 9. apr. 2024 kl. 18.00 skrev Yaroslav Tkachenko :Hi Lasse,Have you seen this approach https://nightlies.apache.org/flink/flink-docs-release-1.19/docs/dev/datastream/testing/#unit-testing-stateful-or-timely-udfs--custom-operators?On Tue, Apr 9, 2024 at 7:09 AM Lasse Nedergaard  wrote:Hi. 

I my Integration test, running on 1.19, with a mini cluster I mock all my sources with DataGeneratorSource and it works fine until I have a timer function in a key processed function. 
The problem is that the processing time doesn’t advance after all data has been produced in the sources. 
so I’m looking for a solution where I can advance the processing and the onTimer method get called. 
Any one who knows how to do that or a nice workaround. 


Med venlig hilsen / Best regards
Lasse Nedergaard




Re: Use of data generator source

2024-04-09 Thread Yaroslav Tkachenko
Hi Lasse,

Have you seen this approach
https://nightlies.apache.org/flink/flink-docs-release-1.19/docs/dev/datastream/testing/#unit-testing-stateful-or-timely-udfs--custom-operators
?

On Tue, Apr 9, 2024 at 7:09 AM Lasse Nedergaard <
lassenedergaardfl...@gmail.com> wrote:

> Hi.
>
> I my Integration test, running on 1.19, with a mini cluster I mock all my
> sources with DataGeneratorSource and it works fine until I have a timer
> function in a key processed function.
> The problem is that the processing time doesn’t advance after all data has
> been produced in the sources.
> so I’m looking for a solution where I can advance the processing and the
> onTimer method get called.
> Any one who knows how to do that or a nice workaround.
>
>
> Med venlig hilsen / Best regards
> Lasse Nedergaard
>
>