fix(site-runtime): NativeAlarmActor retries a lost subscribe response, not only a failed one (S4)

This commit is contained in:
Joseph Doherty
2026-07-09 00:05:09 -04:00
parent feb6f34e90
commit fa556b4f8d
2 changed files with 25 additions and 0 deletions
@@ -378,4 +378,18 @@ public class NativeAlarmActorTests : TestKit, IDisposable
File.Delete(_dbFile);
}
}
[Fact]
public void LostSubscribeResponse_ResendsSubscribe()
{
// S4: a LOST subscribe response (no reply at all) must be re-sent, not only
// a failure reply. The response-timeout arm fires at 2× the retry interval.
var options = new SiteRuntimeOptions { NativeAlarmRetryIntervalMs = 200 };
var dcl = CreateTestProbe();
Spawn(CreateTestProbe().Ref, dcl.Ref, options);
dcl.ExpectMsg<SubscribeAlarmsRequest>();
// Swallow the response entirely — the actor must still re-subscribe.
dcl.ExpectMsg<SubscribeAlarmsRequest>(TimeSpan.FromSeconds(5));
}
}