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):