Skip to content

Commit

Permalink
Skip unsupported runners.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertwb committed Dec 14, 2024
1 parent 0768e10 commit 5918e6d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def test_flattened_side_input(self):
super().test_flattened_side_input(with_transcoding=False)

def test_metrics(self):
super().test_metrics(check_gauge=False)
super().test_metrics(check_gauge=False, check_bounded_trie=False)

def test_sdf_with_watermark_tracking(self):
raise unittest.SkipTest("BEAM-2939")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ def expand(self, pcolls):
pcoll_b = p | 'b' >> beam.Create(['b'])
assert_that((pcoll_a, pcoll_b) | First(), equal_to(['a']))

def test_metrics(self, check_gauge=True):
def test_metrics(self, check_gauge=True, check_bounded_trie=False):
p = self.create_pipeline()

counter = beam.metrics.Metrics.counter('ns', 'counter')
Expand Down Expand Up @@ -1250,11 +1250,12 @@ def test_metrics(self, check_gauge=True):
.with_name('string_set'))['string_sets']
self.assertEqual(str_set.committed, set(elements))

bounded_trie, = res.metrics().query(beam.metrics.MetricsFilter()
.with_name('bounded_trie'))['bounded_tries']
self.assertEqual(bounded_trie.committed.size(), 2)
for element in elements:
self.assertTrue(bounded_trie.committed.contains(tuple(element)), element)
if check_bounded_trie:
bounded_trie, = res.metrics().query(beam.metrics.MetricsFilter()
.with_name('bounded_trie'))['bounded_tries']
self.assertEqual(bounded_trie.committed.size(), 2)
for element in elements:
self.assertTrue(bounded_trie.committed.contains(tuple(element)), element)

def test_callbacks_with_exception(self):
elements_list = ['1', '2']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ def test_pack_combiners(self):
"Requires Prism to support coder:" +
" 'beam:coder:tuple:v1'. https://github.com/apache/beam/issues/32636")

def test_metrics(self):
super().test_metrics(check_bounded_trie=False)


# Inherits all other tests.

Expand Down

0 comments on commit 5918e6d

Please sign in to comment.