test(host): transport fake answers the ReconcileSiteCall wrapper (review 2026-10-21 03/P-1b integration)

This commit is contained in:
Joseph Doherty
2026-10-22 09:15:51 -04:00
parent 6f6534ac7e
commit a9f9ea1c9d
@@ -10,6 +10,7 @@ using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
using ZB.MOM.WW.ScadaBridge.Commons.Messages.Notification;
using ZB.MOM.WW.ScadaBridge.Communication;
using ZB.MOM.WW.ScadaBridge.Communication.Actors;
using ZB.MOM.WW.ScadaBridge.Communication.Grpc;
namespace ZB.MOM.WW.ScadaBridge.Host.Tests;
@@ -542,6 +543,13 @@ public class GrpcCentralTransportTests : IAsyncLifetime
Sender.Tell(new ReconcileSiteResponse([], [], "http://central/"));
});
// The gRPC service now wraps the request with the call's cancellation token.
Receive<ReconcileSiteCall>(_ =>
{
Interlocked.Increment(ref counters.Reconciles);
Sender.Tell(new ReconcileSiteResponse([], [], "http://central/"));
});
// Heartbeat lands here as a Tell (the failback probe); ignore it, no reply expected.
ReceiveAny(_ => { });
}