chore(comm): ctor-inject aggregator reconnect/stability tuning, remove process-global statics (plan R2-02 T12)
This commit is contained in:
+7
-3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user