Commit 02e7b98
committed
Fix StatefulStreamingParDoEvaluatorTest window assertions
The createStreamingSource helper method generates events across 4 different
1-second windows when iterCount=2, because it advances the watermark after
every single batch (even between Key 1 and Key 2 batches).
Previously, VerifyStatefulOutput incorrectly assumed Key 1 and Key 2 would
be emitted in the same windows (Window 1 and Window 2). This caused an
AssertionError because Key 2 actually had 0 elements in Window 1.
This commit updates the assertions in shouldProcessWindowedStatefulParDo
to verify the 4 distinct windows individually, matching the generated
timestamps.1 parent 7676575 commit 02e7b98
1 file changed
Lines changed: 12 additions & 2 deletions
File tree
- runners/spark/src/test/java/org/apache/beam/runners/spark/translation/streaming
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| 375 | + | |
| 376 | + | |
375 | 377 | | |
376 | 378 | | |
377 | 379 | | |
378 | | - | |
| 380 | + | |
379 | 381 | | |
380 | 382 | | |
381 | 383 | | |
382 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
383 | 393 | | |
384 | 394 | | |
385 | 395 | | |
| |||
0 commit comments