Keep two telemetry tests from seeing another test's events #90
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-telemetry-test-isolation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 server6f1c2f1e-0000-7000-8000-000000000003. That id is the fixed server ofKarta.MetricsTest(test/karta/metrics_test.exs:209), which is alsoasync: trueand 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) areasync: falseand 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