Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-telemetry-test-isolation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@core/sync-service": patch
---

Test-only: make the StackSupervisor telemetry test synchronous to avoid serve_shape counter contamination from concurrently running tests. No runtime changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
if Electric.telemetry_enabled?() and Code.ensure_loaded?(ElectricTelemetry.Reporters.Prometheus) do
defmodule Electric.StackSupervisor.TelemetryTest do
use ExUnit.Case, async: true
# Not async: the Prometheus reporter attaches a global :telemetry handler for
# [:electric, :plug, :serve_shape], so concurrent async tests that emit that
# event (via the real serve_shape plug) leak into this reporter's per-status
# counters and make the exact-count assertions below non-deterministic.
use ExUnit.Case, async: false

alias Electric.StackSupervisor.Telemetry

Expand Down
Loading