Skip to content

Commit

Permalink
Test for non-global window
Browse files Browse the repository at this point in the history
  • Loading branch information
hjtran committed Jan 8, 2024
1 parent 04c3b2d commit c96c218
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sdks/python/apache_beam/transforms/util_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,17 @@ def to_type_hint(self):
| beam.Map(lambda foobar: foobar.attr))
assert_that(result, equal_to(['zab']))

# Test a streaming pipeline
options = PipelineOptions()
with beam.Pipeline(options=options) as p:
result = (
p
| beam.Create([FooBar('zab')], reshuffle=False)
| beam.WindowInto(window.SlidingWindows(1, 1))
| beam.Reshuffle()
| beam.Map(lambda foobar: foobar.attr))
assert_that(result, equal_to(['zab']))

@pytest.mark.it_validatesrunner
def test_reshuffle_preserves_timestamps(self):
with TestPipeline() as pipeline:
Expand Down

0 comments on commit c96c218

Please sign in to comment.