Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changelog/5415.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`opentelemetry-sdk`: fix flaky `test_force_flush_late_by_timeout` test by waiting for processor shutdown before asserting span processor call counts
2 changes: 1 addition & 1 deletion opentelemetry-sdk/tests/trace/test_span_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,11 @@ def delayed_flush(_):
flushed = multi_processor.force_flush(timeout_millis=25)
# let the thread executing the late_mock continue
wait_event.set()
multi_processor.shutdown()

self.assertFalse(flushed)
for mock_processor in mocks:
self.assertEqual(1, mock_processor.force_flush.call_count)
multi_processor.shutdown()

def test_force_flush_late_by_span_processor(self):
multi_processor = trace.ConcurrentMultiSpanProcessor(5)
Expand Down