From b8fef8c419fbbe5f575d7137bc3d55b8c2dce62c Mon Sep 17 00:00:00 2001 From: RapidPoseidon Date: Sun, 27 Sep 2026 18:35:17 +0000 Subject: [PATCH] test(telemetry): stop otlp export leaking between tests Co-Authored-By: Claude Opus 5.5 Co-Authored-By: LucStr <25279790+LucStr@users.noreply.github.com> --- tests/conftest.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index f84d878101..716a974cc2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -51,3 +51,11 @@ def agent_sandbox(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> Path: monkeypatch.setattr(sys, "orig_argv", ["python", "-c", "import rapidata"]) monkeypatch.setattr(sys, "argv", ["-c"]) return project + + +@pytest.fixture(autouse=True) +def _resync_tracer_to_global_config(): + yield + # Constructing any LoggingConfig broadcasts to the global tracer, so a test that + # builds one with enable_otlp=True would re-enable export for every later test. + rapidata_config.logging._notify_handlers()