diff --git a/opentelemetry-sdk/tests/trace/export/test_export.py b/opentelemetry-sdk/tests/trace/export/test_export.py index 339b0c7f89..ea31347271 100644 --- a/opentelemetry-sdk/tests/trace/export/test_export.py +++ b/opentelemetry-sdk/tests/trace/export/test_export.py @@ -461,6 +461,10 @@ def _target(): span_processor.shutdown() + @mark.skipif( + python_implementation() == "PyPy" and system() == "Windows", + reason="This test randomly fails with huge delta in Windows with PyPy", + ) def test_batch_span_processor_scheduled_delay(self): """Test that spans are exported each schedule_delay_millis""" spans_names_list = [] @@ -482,7 +486,7 @@ def test_batch_span_processor_scheduled_delay(self): self.assertTrue(export_event.wait(2)) export_time = time.time() self.assertEqual(len(spans_names_list), 1) - self.assertGreaterEqual((export_time - start_time) * 1e3, 500) + self.assertAlmostEqual((export_time - start_time) * 1e3, 500, delta=20) span_processor.shutdown()