I’ve switched my Flink version from 0.10.1 to 1.0 and I have a regression in some of my unit tests.
To narrow the problem, here is what I’ve figured out:
- I use a simple Streaming application with a source defined as “fromElements("Element 1", "Element 2", "Element 3")
- I use a simple time window function with a 3 second window : timeWindowAll(Time.seconds(3))
- I use an apply() function and counts the total number of elements I get with a global counter
With the previous version, I got all three elements because, not because they are triggered under 3 seconds, but because the source ends
With the 1.0 version, I don’t get any elements, and that’s annoying because as the source ends the application ends even if I sleep 5 seconds after the execute() method.
(If I replace fromElement with fromCollection with a 10000 element list and Time.second(3) with Time.millisecond(1), I get a random number of elements)
Is this behavior wanted ? If yes, how do I get my last elements now ?