Commit 2b9c7c1
fix(tests): Fix flaky OTel propagator entry point test (#6655)
Related flaky test run:
https://github.com/getsentry/sentry-python/actions/runs/28110662230/job/83239750332
## Summary
- Fix flaky
`test_propagator_loaded_if_mentioned_in_environment_variable` in the
`potel` test suite
- The old test used `importlib.reload(propagate)` with a patched env
var, which was flaky because OTel's `_importlib_metadata` caches
`entry_points()` with `@functools.cache`
- Replace with a direct `importlib.metadata.entry_points()` query that
verifies registration, value, and loaded class
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent e7262e9 commit 2b9c7c1
1 file changed
Lines changed: 21 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
14 | 24 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 25 | + | |
| 26 | + | |
0 commit comments