test+docs: serialise data-connection gauge tests, add metrics instrument reference (ScadaBridge#99)

DataConnectionGaugeTests and ExtendedInstrumentTests both mutate the process-global data
connection registry; put them in a non-parallel xUnit collection. Add docs/operations/metrics-reference.md.

Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
Joseph Doherty
2026-11-09 14:50:42 -05:00
parent 9764e46439
commit baf89b3df7
4 changed files with 84 additions and 1 deletions
@@ -16,8 +16,11 @@ namespace ZB.MOM.WW.ScadaBridge.Commons.Tests.Observability;
/// gauges is a process-global static, so absolute assertions would inherit the register
/// row 32 flake that makes <c>QueueDepthGaugeTests</c> pass alone and fail under the full
/// concurrent suite. Each test also removes its own connections in a <c>finally</c> so it
/// leaves the shared registry exactly as it found it.
/// leaves the shared registry exactly as it found it. The class is also in the
/// non-parallel <c>DataConnectionGauge</c> collection (Gitea #99), because the deltas can still be
/// corrupted by another class mutating the registry between baseline and assertion.
/// </remarks>
[Collection(DataConnectionGaugeCollection.Name)]
public sealed class DataConnectionGaugeTests
{
private const string ConnectedGauge = "scadabridge.site.data_connections.connected";