Re: API for delayed/scheduled interval input source for integration tests

2018-09-01 Thread Hequn Cheng
Hi Yee, Yes, AbstractStreamOperatorTestHarness is a good way to test an operator. As for iterator, do you use an IT or an UT test? I think Thread.sleeps may works for an IT test. If you use an UT, you probably need to set time by yourself, similar to setProcessingTime in harness test. Best, Hequn

Re: API for delayed/scheduled interval input source for integration tests

2018-08-31 Thread Yee-Ning Cheng
I was able to use the AbstractStreamOperatorTestHarness to write more of a unit test for windowing operators. However, I'm still trying to figure out a way to have a "delayed iterator". I tried implementing an iterator that Thread.sleeps for the interval and passed it to the stream as an input, b

API for delayed/scheduled interval input source for integration tests

2018-08-31 Thread Yee-Ning Cheng
Hi, I've been trying to write an integration test for my Flink application that has managed state with TTL expiration. However, I can't seem to find a good way to create a stream of elements that waits X amount of time before each element is sent in. I'm using the simple API: val stream = env.f