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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user