robertwb commented on a change in pull request #10951: [BEAM-8575] Modified the test to work for different runners. URL: https://github.com/apache/beam/pull/10951#discussion_r384789304
########## File path: sdks/python/apache_beam/transforms/combiners_test.py ########## @@ -482,9 +485,13 @@ def test_combining_with_accumulation_mode_and_fanout(self): trigger=AfterWatermark(early=AfterAll(AfterCount(1)))) | beam.CombineGlobally(sum).without_defaults().with_fanout(2)) - # The frings for DISCARDING mode is [1, 2, 3, 4, 5, 0, 0]. - firings = [1, 3, 6, 10, 15, 15, 15] - assert_that(result, equal_to(firings)) + # Partition the result into early_firings and _. + # In ACCUMULATING mode, the early_frings is [1, 3, 6, 10], other + # firings are [15, 15, ...]. Different runners have different number + # of 15s. + early_firings, _ = result | beam.Partition(is_early_firing, 2) + exepected_early_firings = [1, 3, 6, 10] + assert_that(early_firings, equal_to(exepected_early_firings)) Review comment: We still want to ensure there is at least one 15 firing. (If we're being pedantic, a single on-time firing, plus a number of late firings) The second argument to assert_that can be any predicate taking the set of actual elements. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services