You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flaky test in CI, we are asserting that the time will be greater than 500 but in this run it was less than that. We could probably use assertAlmostEqual instead.
______ TestBatchSpanProcessor.test_batch_span_processor_scheduled_delay _______
self = <tests.trace.export.test_export.TestBatchSpanProcessor testMethod=test_batch_span_processor_scheduled_delay>
def test_batch_span_processor_scheduled_delay(self):
"""Test that spans are exported each schedule_delay_millis"""
spans_names_list = []
export_event = threading.Event()
my_exporter = MySpanExporter(
destination=spans_names_list, export_event=export_event
)
start_time = time.time()
span_processor = export.BatchSpanProcessor(
my_exporter,
schedule_delay_millis=500,
)
# create single span
resource = Resource.create({})
_create_start_and_end_span("foo", span_processor, resource)
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)
E AssertionError: 499.9737739562988 not greater than or equal to 500
Steps to reproduce
tox -e pypy3-opentelemetry-sdk
What is the expected behavior?
Test will pass everytime
What is the actual behavior?
Test is flaky
Additional context
The text was updated successfully, but these errors were encountered:
Describe your environment
Flaky test in CI, we are asserting that the time will be greater than 500 but in this run it was less than that. We could probably use
assertAlmostEqual
instead.Steps to reproduce
tox -e pypy3-opentelemetry-sdk
What is the expected behavior?
Test will pass everytime
What is the actual behavior?
Test is flaky
Additional context
The text was updated successfully, but these errors were encountered: