Fix flaky test that tests lots of threads calling emit. Make sure tests shutdown the batch exporter.#4600
Merged
xrmx merged 6 commits intoopen-telemetry:mainfrom May 27, 2025
Conversation
emdneto
approved these changes
May 26, 2025
emdneto
reviewed
May 26, 2025
xrmx
approved these changes
May 27, 2025
JWinermaSplunk
pushed a commit
to JWinermaSplunk/opentelemetry-python
that referenced
this pull request
Feb 17, 2026
…ts shutdown the batch exporter. (open-telemetry#4600) * Initital commit to imporve shutdown behavior. * Remove print statements and changes from shutdown branch * Remove unused imports/deps * fix lint issue --------- Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
JWinermaSplunk
pushed a commit
to JWinermaSplunk/opentelemetry-python
that referenced
this pull request
Feb 17, 2026
…ts shutdown the batch exporter. (open-telemetry#4600) * Initital commit to imporve shutdown behavior. * Remove print statements and changes from shutdown branch * Remove unused imports/deps * fix lint issue --------- Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the
BachProcessor.test_with_multiple_threadstest which wasn't setup properly and was failing often.Updates all tests using the BatchProcessor to call
shutdownbefore the test ends. Otherwise the worker thread that gets spawned continues to run after the test ends.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
This is just a change to improve the unit tests.
Does This PR Require a Contrib Repo Change?
No
Checklist: