Resolve all 46 low-severity architecture review findings

This commit is contained in:
Joseph Doherty
2026-09-09 22:56:36 -04:00
parent fef3e7675f
commit 9ee402bbcd
139 changed files with 2621 additions and 1082 deletions
@@ -0,0 +1,24 @@
using System.Reflection;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
using ZB.MOM.WW.ScadaBridge.ClusterInfrastructure;
using ZB.MOM.WW.ScadaBridge.Host;
using ZB.MOM.WW.ScadaBridge.Host.Actors;
namespace ZB.MOM.WW.ScadaBridge.Host.Tests;
public class BootstrapCancellationTests
{
[Fact]
public async Task CancelledBootstrap_DoesNotResolveActorSystemOrJoin()
{
var accessed = 0;
var coordinator = new ClusterBootstrapCoordinator(
() => { accessed++; throw new InvalidOperationException("must not resolve during shutdown"); },
Options.Create(new ClusterOptions { SeedNodes = ["akka.tcp://scadabridge@127.0.0.1:2551"] }),
Options.Create(new NodeOptions { NodeHostname = "127.0.0.1", RemotingPort = 2551 }), NullLogger<ClusterBootstrapCoordinator>.Instance);
var run = typeof(ClusterBootstrapCoordinator).GetMethod("RunAsync", BindingFlags.Instance | BindingFlags.NonPublic)!;
await (Task)run.Invoke(coordinator, [new CancellationToken(true)])!;
Assert.Equal(0, accessed);
}
}