bumblebee-coming 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_r387288561
##########
File path: sdks/python/apache_beam/transforms/combiners_test.py
##########
@@ -482,9 +482,17 @@ 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))
+ def has_expected_values(actual):
+ from hamcrest.core import assert_that as hamcrest_assert
+ from hamcrest.library.collection import only_contains
+ ordered = sorted(actual)
+ # Early firings.
+ hamcrest_assert(ordered[:4], only_contains(1, 3, 6, 10))
Review comment:
Done. Thank you! I forgot that `contains` here means exactly match the
entire sequence.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services