Skip to content

Commit

Permalink
Merge pull request #11455 from HuangLED/testFix
Browse files Browse the repository at this point in the history
[BEAM-9703] Fix user distribution metric test by not validating namespace.
  • Loading branch information
lukecwik authored Apr 20, 2020
2 parents d55cab7 + a4e317a commit 5acd866
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sdks/python/apache_beam/metrics/metric_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,14 @@ 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=hc.greater_than_or_equal_to(0),
count_value=hc.greater_than_or_equal_to(0),
min_value=hc.greater_than_or_equal_to(0),
max_value=hc.greater_than_or_equal_to(0)))
hc.assert_that(
metric_results['distributions'], hc.contains_inanyorder(matcher))

Expand Down

0 comments on commit 5acd866

Please sign in to comment.