fix(DV-2): clarify placeholder comment, stable MinValue timestamp, drain DCL probe in new tests

- Replace placeholder-loop comment with the double-render guard explanation
- Use _alarmTimestamps.GetValueOrDefault(binding, DateTimeOffset.MinValue) so the
  placeholder timestamp is stable/idempotent across snapshot calls (was UtcNow)
- Add dcl.ExpectMsg<SubscribeAlarmsRequest>() drain in Snapshot_QuietNativeBinding_EmitsPlaceholder
  and Snapshot_NativeBindingWithLiveCondition_NoPlaceholder to consume the DCL message
  the NativeAlarmActor sends at startup
This commit is contained in:
Joseph Doherty
2026-06-17 15:08:37 -04:00
parent cc017aabfc
commit b5347faf44
2 changed files with 9 additions and 4 deletions
@@ -100,6 +100,7 @@ public class InstanceActorNativeAlarmTests : TestKit, IDisposable
{
var dcl = CreateTestProbe();
var actor = CreateInstanceActorWithDcl("inst", ConfigWithNativeSource("inst"), dcl.Ref);
dcl.ExpectMsg<SubscribeAlarmsRequest>();
// No live condition is emitted: the configured "Pressure" binding is quiet.
actor.Tell(new SubscribeDebugViewRequest("inst", "c"));
@@ -121,6 +122,7 @@ public class InstanceActorNativeAlarmTests : TestKit, IDisposable
{
var dcl = CreateTestProbe();
var actor = CreateInstanceActorWithDcl("inst", ConfigWithNativeSource("inst"), dcl.Ref);
dcl.ExpectMsg<SubscribeAlarmsRequest>();
// The NativeAlarmActor emits a live condition stamped with the binding's
// canonical name (DV-1: NativeSourceCanonicalName), so the binding is "active".