chore(comm): ctor-inject aggregator reconnect/stability tuning, remove process-global statics (plan R2-02 T12)

This commit is contained in:
Joseph Doherty
2026-07-13 10:19:51 -04:00
parent c29e588905
commit b7f8632db8
3 changed files with 26 additions and 12 deletions
@@ -24,10 +24,12 @@ public class SiteAlarmAggregatorActorTests : TestKit
public SiteAlarmAggregatorActorTests() : base(@"akka.loglevel = WARNING")
{
SiteAlarmAggregatorActor.ReconnectDelay = TimeSpan.FromMilliseconds(50);
SiteAlarmAggregatorActor.StabilityWindow = TimeSpan.FromSeconds(30);
}
// Former process-global static test seams, now ctor-injected per actor (R2 T12).
private static readonly TimeSpan TestReconnectDelay = TimeSpan.FromMilliseconds(50);
private static readonly TimeSpan TestStabilityWindow = TimeSpan.FromSeconds(30);
// ── Test doubles ────────────────────────────────────────────────────────────
/// <summary>
@@ -146,7 +148,9 @@ public class SiteAlarmAggregatorActorTests : TestKit
var props = Props.Create(() => new SiteAlarmAggregatorActor(
SiteId, "corr-1", seed.Seed, sink.Publish, factory, GrpcNodeA, GrpcNodeB,
reconcileInterval ?? TimeSpan.FromMinutes(10),
publishCoalesce ?? TimeSpan.Zero));
publishCoalesce ?? TimeSpan.Zero,
TestReconnectDelay,
TestStabilityWindow));
var actor = Sys.ActorOf(props);
return (actor, seed, sink, factory);