From ecd03bc4db28f59c74a6dc6d98aa835c2f205e30 Mon Sep 17 00:00:00 2001 From: czhang771 Date: Wed, 4 Sep 2024 11:04:03 -0700 Subject: [PATCH] fix view instrument match test case --- .../tests/metrics/test_view_instrument_match.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opentelemetry-sdk/tests/metrics/test_view_instrument_match.py b/opentelemetry-sdk/tests/metrics/test_view_instrument_match.py index 48481b5bd8..17c185294c 100644 --- a/opentelemetry-sdk/tests/metrics/test_view_instrument_match.py +++ b/opentelemetry-sdk/tests/metrics/test_view_instrument_match.py @@ -610,10 +610,11 @@ def test_consume_measurement_with_exemplars(self): # Verify that exemplars have been correctly stored and collected # As the default reservoir as only one bucket, it will retain - # the last measurement as exemplar + # either one of the measurements based on random selection self.assertEqual(len(data_points[0].exemplars), 1) - self.assertEqual(data_points[0].exemplars[0].value, 5.0) + self.assertIn(data_points[0].exemplars[0].value, [4.0, 5.0]) + class TestAlignedHistogramBucketExemplarReservoir(TestCase):