From db4c0dbaae5489dd273b1382b8f1ae1501b3055b Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Wed, 13 Mar 2024 17:43:13 -0600 Subject: [PATCH] Skip celery test case if running in PyPy Fixes #2348 --- .../tests/test_metrics.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/instrumentation/opentelemetry-instrumentation-celery/tests/test_metrics.py b/instrumentation/opentelemetry-instrumentation-celery/tests/test_metrics.py index 01c9487ea8..f83759317b 100644 --- a/instrumentation/opentelemetry-instrumentation-celery/tests/test_metrics.py +++ b/instrumentation/opentelemetry-instrumentation-celery/tests/test_metrics.py @@ -1,7 +1,10 @@ import threading import time +from platform import python_implementation from timeit import default_timer +from pytest import mark + from opentelemetry.instrumentation.celery import CeleryInstrumentor from opentelemetry.test.test_base import TestBase @@ -62,6 +65,9 @@ def test_basic_metric(self): est_value_delta=200, ) + @mark.skipif( + python_implementation() == "PyPy", reason="Fails randomly in pypy" + ) def test_metric_uninstrument(self): CeleryInstrumentor().instrument()