Re: Unit / Integration Test Timer

2018-09-17 Thread ashish pok
Hi Till, A quick update. I added a MockFlatMap function with the following logic: public MockStreamPause(int pauseSeconds) { this.pauseSeconds = pauseSeconds; } @Override public void flatMap(PlatformEvent event, Collector out) throws Exception { if(event.getSrc().startsWith(Even

Re: Unit / Integration Test Timer

2018-09-17 Thread ashish pok
Hi Till, I am still in 1.4.2 version and will need some time before we can get later version certified in our Prod env. Timers are definitely not completing in my tests with 1.4.2 utils, I can see them being registered in debugger though. Having said that, should I pull latest test utils only a

Re: Unit / Integration Test Timer

2018-09-17 Thread Till Rohrmann
Hi Ashish, I think you are right. In the current master, the system should wait until all timers have completed before terminating. Could you check whether this is the case? If not, then this might indicate a problem. Which version of Flink are you using? I guess it would also be helpful to have a

Re: Unit / Integration Test Timer

2018-09-14 Thread ashish pok
Hi Till, To answer your first question, I currently don't (and honestly now sure how other than of course in IDE I can use breakpoint, or if something like MockIto can do it). So did I interpret it correctly that it sounds like execution env started using flink-test-utils will essentially tear

Re: Unit / Integration Test Timer

2018-09-14 Thread Till Rohrmann
Hi Ashish, how do you make sure that all of your data is not consumed within a fraction of the 2 seconds? For this it would be better to use event time which allows you to control how time passes. If you want to test a specific operator you could try out the One/TwoInputStreamOperatorTestHarness.

Unit / Integration Test Timer

2018-09-14 Thread ashish pok
All, Hopefully a quick one. I feel like I have seen this answered before a few times before but can't find an appropriate example. I am trying to run few tests where registered timeouts are invoked (snippet below). Simple example as show in documentation for integration test (using flink-test-ut