Github user aljoscha commented on the issue:
https://github.com/apache/flink/pull/2263
Oh, and I forgot: the checking for the correct number of elements can be
moved out of the window function and into the test itself, like this:
```
JobExecutionResult result = env.execute();
Assert.assertEquals(
(LATE_EVENTS_PER_SESSION + 1) * NUMBER_OF_SESSIONS *
EVENTS_PER_SESSION,
result.getAccumulatorResult(SESSION_COUNTER_ON_TIME_KEY));
Assert.assertEquals(
NUMBER_OF_SESSIONS * (LATE_EVENTS_PER_SESSION *
(LATE_EVENTS_PER_SESSION + 1) / 2),
result.getAccumulatorResult(SESSION_COUNTER_LATE_KEY));
```
Also, you can let the test class extend
`StreamingMultipleProgramsTestBase`. This will setup a testing cluster with
parallelism 4. You can then use this inside your test:
```
StreamExecutionEnvironment env =
StreamExecutionEnvironment.getExecutionEnvironment()
```
If you make the source non-parallel the window operator will then run with
parallelism 4 and counting the number of elements after the job is done will
accumulate the counts from all parallel instances.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---