diff --git a/sdks/python/apache_beam/transforms/window_test.py b/sdks/python/apache_beam/transforms/window_test.py index 0d5e14f4e818..3c45d833c426 100644 --- a/sdks/python/apache_beam/transforms/window_test.py +++ b/sdks/python/apache_beam/transforms/window_test.py @@ -286,21 +286,21 @@ def test_timestamped_with_combiners(self): @attr('ValidatesRunner') def test_window_assignment_idempotency(self): with TestPipeline() as p: - pcoll = self.timestamped_key_values(p, 'key', 0, 1, 2, 3, 4) + pcoll = self.timestamped_key_values(p, 'key', 0, 2, 4) result = (pcoll | 'window' >> WindowInto(FixedWindows(2)) | 'same window' >> WindowInto(FixedWindows(2)) | 'same window again' >> WindowInto(FixedWindows(2)) | GroupByKey()) - assert_that(result, equal_to([('key', [0, 1]), - ('key', [2, 3]), + assert_that(result, equal_to([('key', [0]), + ('key', [2]), ('key', [4])])) @attr('ValidatesRunner') def test_window_assignment_through_multiple_gbk_idempotency(self): with TestPipeline() as p: - pcoll = self.timestamped_key_values(p, 'key', 0, 1, 2, 3, 4) + pcoll = self.timestamped_key_values(p, 'key', 0, 2, 4) result = (pcoll | 'window' >> WindowInto(FixedWindows(2)) | 'gbk' >> GroupByKey() @@ -309,8 +309,8 @@ def test_window_assignment_through_multiple_gbk_idempotency(self): | 'same window again' >> WindowInto(FixedWindows(2)) | 'gbk again' >> GroupByKey()) - assert_that(result, equal_to([('key', [[[0, 1]]]), - ('key', [[[2, 3]]]), + assert_that(result, equal_to([('key', [[[0]]]), + ('key', [[[2]]]), ('key', [[[4]]])])) class RunnerApiTest(unittest.TestCase):