test(site-runtime): fix stale SetStaticAttribute tests

HandleSetStaticAttribute was made fire-and-forget (commit 2951507) — it no
longer replies with SetStaticAttributeResponse — but three InstanceActor
tests still ExpectMsg<SetStaticAttributeResponse> and timed out. Verify the
mutation via the GetAttributeRequest round-trip instead, which the FIFO
mailbox makes a sound sync point. Test intent (in-memory update, SQLite
persistence, serialized ordering) is unchanged.
This commit is contained in:
Joseph Doherty
2026-05-16 14:33:09 -04:00
parent d63d412461
commit d030153378
2 changed files with 12 additions and 12 deletions

View File

@@ -123,11 +123,9 @@ public class InstanceActorIntegrationTests : TestKit, IDisposable
$"corr-{i}", "Pump1", "Temperature", $"{i}", DateTimeOffset.UtcNow));
}
// Wait for all to process
for (int i = 0; i < 50; i++)
{
ExpectMsg<SetStaticAttributeResponse>(TimeSpan.FromSeconds(10));
}
// SetStaticAttributeCommand is fire-and-forget; the GetAttributeRequest
// round-trip below is the sync point — the FIFO mailbox guarantees all
// 50 sets are processed before the get is.
// The last value should be the final one
actor.Tell(new GetAttributeRequest(