HuangLED commented on a change in pull request #11455: Fix user distribution
metric test by not validating namespace.
URL: https://github.com/apache/beam/pull/11455#discussion_r410733533
##########
File path: sdks/python/apache_beam/metrics/metric_test.py
##########
@@ -172,10 +172,13 @@ def process(self, element):
# Verify user distribution counter.
metric_results = res.metrics().query()
matcher = MetricResultMatcher(
- namespace='apache_beam.metrics.metric_test.SomeDoFn',
+ step='ApplyPardo',
+ namespace=hc.contains_string('SomeDoFn'),
name='element_dist',
committed=DistributionMatcher(
- sum_value=10, count_value=4, min_value=1, max_value=4))
+ sum_value=10, count_value=4,
Review comment:
b/c after repeating it multiple times, streaming side gives consistent
outcome on these exact numbers.
After another thought though, given how much uncertainties there are on
streaming side, it is really not necessary to put exact number here. And if we
do really want to check exact number, there is alternative way to add that
separately.
Updated by making all other threes to be 'greater_than(0)'. PTAL.
----------------------------------------------------------------
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