Keep two telemetry tests from seeing another test's events #90

Merged
calvin merged 1 commit from fix-telemetry-test-isolation into master 2026-11-13 03:07:12 +00:00
Owner

Master pipeline 205 (the merge of #89) failed on one test: test/karta/bounces_test.exs:54, "a bounce is measured once, however often the report arrives", received a [:karta, :bounce] event for server 6f1c2f1e-0000-7000-8000-000000000003. That id is the fixed server of Karta.MetricsTest (test/karta/metrics_test.exs:209), which is also async: true and emits bounce and complaint events. Telemetry handlers are global, and the test refuted any bounce event, so it failed when the two tests ran at the same moment.

The same tree passed in pull request pipeline 203 and in the fork pipeline 267; nothing in #89 touches bounces. So this is a test isolation fault, not a product fault.

Fix: the bounce test and its twin for complaints refute only events of their own server. The two other tests with a wildcard refute (metrics/received_test.exs, metrics/report_test.exs) are async: false and cannot overlap with async tests, so they are left as they are.

Not run locally; CI on this pull request is the check.

🤖 Generated with Claude Code

Master pipeline 205 (the merge of #89) failed on one test: `test/karta/bounces_test.exs:54`, "a bounce is measured once, however often the report arrives", received a `[:karta, :bounce]` event for server `6f1c2f1e-0000-7000-8000-000000000003`. That id is the fixed server of `Karta.MetricsTest` (`test/karta/metrics_test.exs:209`), which is also `async: true` and emits bounce and complaint events. Telemetry handlers are global, and the test refuted any bounce event, so it failed when the two tests ran at the same moment. The same tree passed in pull request pipeline 203 and in the fork pipeline 267; nothing in #89 touches bounces. So this is a test isolation fault, not a product fault. Fix: the bounce test and its twin for complaints refute only events of their own server. The two other tests with a wildcard refute (`metrics/received_test.exs`, `metrics/report_test.exs`) are `async: false` and cannot overlap with async tests, so they are left as they are. Not run locally; CI on this pull request is the check. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Keep two telemetry tests from seeing another test's events
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
cbebb7cd2c
"A bounce is measured once" and "a complaint is measured once" refuted ANY
bounce or complaint event. Telemetry handlers are global, and Karta.MetricsTest
(also async) emits both events for its own server, so the tests failed whenever
the two ran at the same moment (master pipeline 205). They now refute only
events of their own server.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
calvin merged commit 572c0d67ae into master 2026-11-13 03:07:12 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
external/karta!90
No description provided.