Commit c480d97
fix(tests): Fix flaky OTel propagator entry point test
The old test used `importlib.reload(propagate)` with a patched
`OTEL_PROPAGATORS` env var, which was flaky because OTel's
`_importlib_metadata` module caches `entry_points()` with
`@functools.cache`. Depending on when the cache was first populated,
the "sentry" entry point might not be found during the reload.
Replace with a direct `importlib.metadata.entry_points()` query that
verifies the entry point is registered, has the correct value, and
loads to `SentryPropagator`.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent e7262e9 commit c480d97
1 file changed
Lines changed: 8 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
| 1 | + | |
6 | 2 | | |
7 | 3 | | |
8 | 4 | | |
9 | 5 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
14 | 11 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 12 | + | |
| 13 | + | |
0 commit comments